I'm not sure I see anything so I will just show the entire wsdl, hopefully
someone can find something that will show me what to change in the wsdl to
change so that I not pass the parameter by ref:
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitio ns xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:tns="http ://tempuri.org"
xmlns:s1="http://schemas.microso ft.com/BizTalk/2003/Any"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="h ttp://schemas.xmlsoap .org/wsdl/soap12/"
xmlns:http="htt p://schemas.xmlsoap .org/wsdl/http/"
targetNamespace ="http://tempuri.org"
xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">
<wsdl:documenta tion xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">BizTalk
assembly "MyMethod, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 54556428737eb89 f" published web service.</wsdl:documentat ion>
- <wsdl:types>
- <s:schema elementFormDefa ult="qualified"
targetNamespace ="http://tempuri.org">
<s:import namespace="http ://schemas.microso ft.com/BizTalk/2003/Any" />
- <s:element name="MyMethod" >
- <s:complexTyp e>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Root" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="MyMethodR esponse">
- <s:complexTyp e>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Root" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
- <s:schema elementFormDefa ult="qualified"
targetNamespace ="http://schemas.microso ft.com/BizTalk/2003/Any">
- <s:element name="Root">
- <s:complexTyp e mixed="true">
- <s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="MyMethodS oapIn">
<wsdl:part name="parameter s" element="tns:My Method" />
</wsdl:message>
- <wsdl:message name="MyMethodS oapOut">
<wsdl:part name="parameter s" element="tns:My MethodResponse" />
</wsdl:message>
- <wsdl:portTyp e name="Transport OrdersWSSoap">
- <wsdl:operati on name="MyMethod" >
<wsdl:input message="tns:My MethodSoapIn" />
<wsdl:output message="tns:My MethodSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Transport OrdersWSSoap"
type="tns:Trans portOrdersWSSoa p">
<soap:binding transport="http ://schemas.xmlsoap .org/soap/http" />
- <wsdl:operati on name="MyMethod" >
<soap:operati on soapAction="htt p://tempuri.org/WebService_MyMe thod/MyMethod"
style="document " />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="Transport OrdersWSSoap12"
type="tns:Trans portOrdersWSSoa p">
<soap12:bindi ng transport="http ://schemas.xmlsoap .org/soap/http" />
- <wsdl:operati on name="MyMethod" >
<soap12:operati on
soapAction="htt p://tempuri.org/WebService_MyMe thod/MyMethod"
style="document " />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Transport OrdersWS">
<wsdl:documenta tion xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">BizTalk
assembly "MyMethod, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 54556428737eb89 f" published web service.</wsdl:documentat ion>
- <wsdl:port name="Transport OrdersWSSoap"
binding="tns:Tr ansportOrdersWS Soap">
<soap:address
location="http://localhost/TransportOrders WS/TransportOrders WS.asmx" />
</wsdl:port>
- <wsdl:port name="Transport OrdersWSSoap12"
binding="tns:Tr ansportOrdersWS Soap12">
<soap12:addre ss
location="http://localhost/TransportOrders WS/TransportOrders WS.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definition s>
"John Saunders" <john.saunder s at trizetto.comwro te in message
news:eW******** *****@TK2MSFTNG P05.phx.gbl...
"Nick K." <nk*****@msn.co mwrote in message
news:uS******** ******@TK2MSFTN GP04.phx.gbl...
>>I use wsdl.exe to generate client code to call a web service. The actual
web service is generated with the BizTalk Web Services Publishing Wizard.
I'm not sure this is particular to the BizTalk code but the calls to web
methods pass parameters by ref so that I have to call it like:
XmlDocument doc = new XmlDocument();
doc.LoadXml(me ssage);
XmlNode node = doc.DocumentEle ment.ParentNode ;
ws.MyMethod(re f node);
I attempt to modify the generated client code so that the parameter is
not passed by ref and is instead returned as a response but I keep
getting an "object not referenced" error.
Is there a way to tell wsdl.exe to not generate a "ref" parameter?
Is the problem I describe just because this is calling a BizTalk web
service or have others seen this?
If WSDL.EXE is generating a "ref" parameter, then the chances are that it
needs to be a "ref" parameter.
Have you taken a look into the WSDL file to see what it says about this
parameter?
John