i have axis 1.4 webservice runs on jboss. request ok, cant deserialize response axis in windows 8 store app c#. object mymethodrespone null. add service via addservicereference in vs. here wsdl (only important code snippets):
<xsd:complextype name="arrayof_xsd_string"> <xsd:sequence> <xsd:element minoccurs="0" maxoccurs="unbounded" name="item" type="xsd:string" /> </xsd:sequence> </xsd:complextype> <xsd:complextype name="arrayof_tns1_alternativetransferable"> <xsd:sequence> <xsd:element minoccurs="0" maxoccurs="unbounded" name="item" type="tns1:mytransferable" /> </xsd:sequence> </xsd:complextype> <xsd:complextype name="alternativetransferable"> <xsd:sequence> <xsd:element name="alternativelist" nillable="true" type="impl:arrayof_xsd_string" /> </xsd:sequence> </xsd:complextype> <xsd:complextype name="mytransferable"> <xsd:sequence> <xsd:element name="alternatives" nillable="true"type="impl:arrayof_tns1_alternativetransferable" /> <xsd:element name="mod" nillable="true" type="impl:arrayof_xsd_string" /> <xsd:element name="msnlist" nillable="true" type="impl:arrayof_xsd_string" /> </xsd:sequence> </xsd:complextype> <wsdl:operation name="mymethod" parameterorder="msnlist epaccodes"> <wsdl:input name="mymethodrequest" message="impl:mymethodrequest" /> <wsdl:output name="mymethodresponse" message="impl:mymethodresponse" /> <wsdl:fault name="webservicerequestexception" message="impl:webservicerequestexception" /> </wsdl:operation> <wsdl:message name="mymethodresultresponse"> <wsdl:part name="mymethodreturn" type="tns1:mytransferable" /> </wsdl:message>
the generated proxy visual studio looks like:
[system.diagnostics.debuggerstepthroughattribute()] [system.codedom.compiler.generatedcodeattribute("system.servicemodel", "4.0.0.0")] [system.componentmodel.editorbrowsableattribute(system.componentmodel.editorbrowsablestate.advanced)] [system.servicemodel.messagecontractattribute(wrappername="mymethodresponse", wrappernamespace="http://localhost:8080/h970live/services/configuration", iswrapped=true)] public partial class mymethodresponse { [system.servicemodel.messagebodymemberattribute(namespace="", order=0)] public myproject.model.mytransferable mymethodreturn; public mymethodresponse() { } public mymethodresponse(myproject.model.mytransferable mymethodreturn) { this.mymethodreturn = mymethodreturn; } } [system.codedom.compiler.generatedcodeattribute("system.xml", "4.0.30319.18213")] [system.diagnostics.debuggerstepthroughattribute()] [system.xml.serialization.xmltypeattribute(namespace="http://entity.webservice.server.de")] public partial class mytransferable : object, system.componentmodel.inotifypropertychanged { private alternativetransferable[] alternativesfield; private string[] modfield; private string[] msnlistfield; /// <remarks/> [system.xml.serialization.xmlarrayattribute(form=system.xml.schema.xmlschemaform.unqualified, isnullable=true, order=0)] [system.xml.serialization.xmlarrayitemattribute("item", form=system.xml.schema.xmlschemaform.unqualified, isnullable=false)] public alternativetransferable[] alternatives { { return this.alternativesfield; } set { this.alternativesfield = value; this.raisepropertychanged("alternatives"); } } /// <remarks/> [system.xml.serialization.xmlarrayattribute(form=system.xml.schema.xmlschemaform.unqualified, isnullable=true, order=1)] [system.xml.serialization.xmlarrayitemattribute("item", form=system.xml.schema.xmlschemaform.unqualified, isnullable=false)] public string[] mod { { return this.modfield; } set { this.modfield = value; this.raisepropertychanged("mod"); } } /// <remarks/> [system.xml.serialization.xmlarrayattribute(form=system.xml.schema.xmlschemaform.unqualified, isnullable=true, order=2)] [system.xml.serialization.xmlarrayitemattribute("item", form=system.xml.schema.xmlschemaform.unqualified, isnullable=false)] public string[] msnlist { { return this.msnlistfield; } set { this.msnlistfield = value; this.raisepropertychanged("msnlist"); } } public event system.componentmodel.propertychangedeventhandler propertychanged; protected void raisepropertychanged(string propertyname) { system.componentmodel.propertychangedeventhandler propertychanged = this.propertychanged; if ((propertychanged != null)) { propertychanged(this, new system.componentmodel.propertychangedeventargs(propertyname)); } } [system.codedom.compiler.generatedcodeattribute("system.xml", "4.0.30319.18213")] [system.diagnostics.debuggerstepthroughattribute()] [system.xml.serialization.xmltypeattribute(namespace="http://entity.webservice.server.de")] public partial class alternativetransferable : object, system.componentmodel.inotifypropertychanged { private string[] alternativelist; /// <remarks/> [system.xml.serialization.xmlarrayattribute(form=system.xml.schema.xmlschemaform.unqualified, isnullable=true, order=0)] [system.xml.serialization.xmlarrayitemattribute("item", form=system.xml.schema.xmlschemaform.unqualified, isnullable=false)] public string[] epactdus { { return this.alternativelist; } set { this.alternativelist = value; this.raisepropertychanged("epactdus"); } } public event system.componentmodel.propertychangedeventhandler propertychanged; protected void raisepropertychanged(string propertyname) { system.componentmodel.propertychangedeventhandler propertychanged = this.propertychanged; if ((propertychanged != null)) { propertychanged(this, new system.componentmodel.propertychangedeventargs(propertyname)); } } } }
and client options in svcmap file:
<clientoptions> <generateasynchronousmethods>false</generateasynchronousmethods> <generatetaskbasedasynchronousmethod>true</generatetaskbasedasynchronousmethod> <enabledatabinding>true</enabledatabinding> <excludedtypes /> <importxmltypes>false</importxmltypes> <generateinternaltypes>false</generateinternaltypes> <generatemessagecontracts>false</generatemessagecontracts> <namespacemappings /> <collectionmappings> <collectionmapping typename="system.collections.objectmodel.observablecollection`1" category="list" /> </collectionmappings> <generateserializabletypes>false</generateserializabletypes> <serializer>auto</serializer> <useserializerforfaults>false</useserializerforfaults> <referenceallassemblies>true</referenceallassemblies> <referencedassemblies /> <referenceddatacontracttypes /> <servicecontractmappings />
the response looks like:
<?xml version="1.0" encoding="utf-8"?> <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soapenv:body> <mymethodresponse xmlns="http://webservice.server.de"> <mymethodreturn> <alternatives> <alternatives> <alternativelist/> </alternatives> </alternatives> <mod> <mod>cn22.00.998-01</mod> </mod> <msnlist> <msnlist>n-2228</msnlist> <msnlist>n-2456</msnlist> <msnlist>n-2213</msnlist> <msnlist>n-2716</msnlist> <msnlist>n-3065</msnlist> </msnlist> </mymethodreturn> </mymethodresponse> </soapenv:body></soapenv:envelope>
can me?
Comments
Post a Comment