Problem generating c# proxy class from IBM websphere (AXIS) webservice WSDL.

F

ffhansix

Hi,

I am having problems with generating a c# proxy class from a IBM
websphere WSDL file, when running the wsdl.exe to create the c# proxy
file command i recieve an error:

Warning: one or more operations were skipped.
Warnings were encountered. Review generated source comments for more
details.

Writing file 'c:\proxyclass.cs'.

After reviewing the created proxyclass.cs i find that the following
error message:

// CODEGEN: The operation binding 'CustomerUpdate' from namespace
'http://www.mywebsite.com/webse­rvices/wsdl/Service.wsdl' was ignored.

Missing soap:body input binding.

After many hours of searching through newsgroups i have reached the
conclusion that the following part of the WSDL file cannot be
interpered correctly:

<wsdl:input name="CustomerUpdateInput">
<mime:multipartRelated>
<mime:part>
<soap:body use="literal" part="customerupdate"/>
</mime:part>
<mime:part>
<mime:content part="customerupdatedata"
type="application/x-gzip"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>

This is apperently because .NET does not have support for MIME, but
only for DIME, as i have read in various newgroups, could be wrong (i
sure hope so :))

Does anyone know if my assumption is correct or not and have anyone had
this problem before and solved it?

Have anyone of you had this problem before and know the solution, or
could point me in the right direction or something else related to this
issue i would be very grateful.


I include the WSDL file (i have changed service specific addresses to
protect the customer im working with.) And my generated proxy class.

Copy of the WSDL file:
------------------------------­---
<?xml version="1.0" encoding="utf-8"?>


<wsdl:definitions name="Myname"
xmlns:xsd="http://www.w3.org/2001/XMLSche­ma"
xmlns:soap="http://schemas.xmlsoap.org/wsd­l/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsd­l/"
xmlns:mime="http://schemas.xmlsoap.org/wsd­l/mime/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soa­p/encoding/"
xmlns:tns="http://www.customerwebsite.com/webservices/wsdl/webService.w­sdl"


targetNamespace="http://www.customerwebsite.com/webservices/wsdl/webService.w­sdl">


<wsdl:types>
<xsd:schema
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<xsd:complexType name="customerupdateType">
<xsd:all>
<xsd:element name="username"
type="xsd:string" />
<xsd:element name="password"
type="xsd:string" />
</xsd:all>
</xsd:complexType>
<xsd:complexType
name="customerupdateResponseTy­pe">
<xsd:all>
<xsd:element
name="statusmessage" type="xsd:string" />
<xsd:element name="statusdate"
type="xsd:date" />
</xsd:all>
</xsd:complexType>
</xsd:schema>
</wsdl:types>


<wsdl:message name="CustomerUpdateIn">
<wsdl:part type="tns:customerupdateType"
name="customerupdate"/>
<wsdl:part name="customerupdatedata"
type="xsd:base64Binary"/>
</wsdl:message>


<wsdl:message name="CustomerUpdateOut">
<wsdl:part type="tns:customerupdateRespon­seType"
name="customerupdateresponse"/­>
</wsdl:message>


<wsdl:message name="CustomerUpdateException"­>
<wsdl:part type="xsd:string" name="errormessage"/>
</wsdl:message>


<wsdl:portType name="CustomerUpdatePortType">
<wsdl:eek:peration name="CustomerUpdate">
<wsdl:input name="CustomerUpdateInput"
message="tns:CustomerUpdateIn"­/>
<wsdl:eek:utput name="CustomerUpdateOutput"
message="tns:CustomerUpdateOut­"/>
<wsdl:fault name="CustomerUpdateFault"
message="tns:CustomerUpdateExc­eption"/>
</wsdl:eek:peration>
</wsdl:portType>


<wsdl:binding name="CustomerUpdateBinding"
type="tns:CustomerUpdatePortTy­pe">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soa­p/http"/>
<wsdl:eek:peration name="CustomerUpdate">
<soap:eek:peration
soapAction="http://www.customerwebsite.com­/webservices/intern/update"/>

<wsdl:input name="CustomerUpdateInput">
<mime:multipartRelated>
<mime:part>
<soap:body
use="literal" part="customerupdate"/>
</mime:part>
<mime:part>
<mime:content
part="customerupdatedata"
type="application/x-gzip"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:eek:utput name="CustomerUpdateOutput">
<soap:body use="literal"/>
</wsdl:eek:utput>
<wsdl:fault name="CustomerUpdateFault">
<soap:fault name="CustomerUpdateFault"
use="literal"/>
</wsdl:fault>
</wsdl:eek:peration>
</wsdl:binding>


<wsdl:service name="CustomerUpdateService">
<wsdl:port name="CustomerUpdatePort"
binding="tns:CustomerUpdateBin­ding">
<soap:address
location="http://www.customerwebsite.com­/webservices/customerupdate"/>

</wsdl:port>
</wsdl:service>
</wsdl:definitions>


Copy of the C# generated proxy class:
------------------------------­-------
//
// This source code was auto-generated by wsdl, Version=1.1.4322.2032.
//
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;


/// <remarks/>
// CODEGEN: The operation binding 'CustomerUpdate' from namespace
'http://www.customerwebsite.com­/webservices/wsdl/webService.w­sdl'
was
ignored. Missing soap:body input binding.
[System.Diagnostics.DebuggerSt­epThroughAttribute()]
[System.ComponentModel.Designe­rCategoryAttribute("code")]
[System.Web.Services.WebServic­eBindingAttribute(Name="Custom­erUpdateBinding",

Namespace="http://www.customerwebsite.com­/webservices/wsdl/WebService.w­sdl")]

public class CustomerUpdateService :
System.Web.Services.Protocols.­SoapHttpClientProtocol {


/// <remarks/>
public CustomerUpdateService() {
this.Url =
"http://www.customerwebsite.com­/webservices/customerupdate";
}



}


Sincerely,
Hans Sixhöj
Systems Developer
Microsoft Certified Solution Developer
Visma Consulting AB
(e-mail address removed)
 
K

Keenan Newton

Your assumption is correct .Net does not support MIME. Below is a link
on today's supported types.

http://msdn.microsoft.com/library/d...ml/cpconaspnetimplementationofwebservices.asp

So the question is what can you do well. First of all you can't use
the web service as is, at least not this method that supports the MIME.
You can have the web service provider change the file to a byte array,
or base64 string. Another option is WSE. (Web Service Enhancements).
This will allow you to use DIME, or with 2.0 of WSE you can use
WS-Attachments. Other then that not much else I can think of that you
can do. You will need to work out a resolution with your web service
provider. My suggestion is WS-Attachments. It's relatively easy, and
performs well.
 
F

ffhansix

Thank you for answering my post,

So .NET does not support MIME at all, only DIME, as i suspected. My
service provider should then provide a web service with a method that
uses DIME or change the method to accept a byte array or base 64
string.

Sincerely,
/Hans Sixhöj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top