Dan,
thanks for the answer.
I think the problem is that the people who developed the web service treat
the "PDataXML" as a string. since when creating the XML doc the empty xmlns
was added to the root element, their server rejects the call. the error I am
getting from them is "Bad message : expected text, got start of element
{}customerGeneralInquiryRequests "
they claim the specific problem is that empty xmlns I get on the element
"customerGeneralInquiryRequests ". who is creating this? even when I changed
the code so it creates the whole xml document in one LoadXML call, I still
get this empty xmlns.
<PDataXML xmlns="http://systinet.com/wsdl/steelcase/server/ifaces/struct/">
<customerGeneralInquiryRequests xmlns="">
I am attaching the entire WSDL file
thanks, Jerome
------------------------------- WSDL
file ---------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s1="http://idoox.com/interface"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://systinet.com/soap-jta/"
xmlns:s3="http://systinet.com/xsd/SchemaTypes/"
xmlns:s2="http://systinet.com/wsdl/steelcase/server/ifaces/struct/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://webservices.hedberg.com"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://webservices.hedberg.com"
name="steelcase.server.ifaces.ServiceRootSoap"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://systinet.com/soap-jta/" elementFormDefault="qualified"
targetNamespace="http://systinet.com/soap-jta/">
<xsd:element name="TxId">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" nillable="true" type="xsd:string" />
<xsd:element name="NoTxResume" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</s:schema>
<s:schema xmlns:tns="http://idoox.com/interface"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://idoox.com/interface">
<s:complexType name="serviceReference">
<s:sequence>
<s:element name="service" type="s:QName" />
<s:element name="wsdl" type="s:anyURI" />
<s:element minOccurs="0" name="instanceID" type="s:string" />
<s:element minOccurs="0" name="portTypeMappings"
type="tns:ArrayOfInterfaceMapping" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfInterfaceMapping">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="item"
type="tns:interfaceMapping" />
</s:sequence>
</s:complexType>
<s:complexType name="interfaceMapping">
<s:sequence>
<s:element name="portType" type="s:QName" />
<s:element name="className" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="instance">
<s:annotation>
<s:documentation>
this is the SOAP header schema
this SOAP header SHOULD have soap-env:mustUnderstand set to "1"
this header MUST be present at most once in any message
</s:documentation>
</s:annotation>
<s:complexType>
<s:choice>
<s:element name="id" type="s:string" />
<s:element name="setId" type="s:string" />
<s:element name="notFound" type="s:string" />
</s:choice>
</s:complexType>
</s:element>
</s:schema>
<s:schema
xmlns:tns="http://systinet.com/wsdl/steelcase/server/ifaces/struct/"
xmlns:map="http://systinet.com/mapping/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://systinet.com/wsdl/steelcase/server/ifaces/struct/">
<xsd:complexType name="ScsServiceHeader">
<xsd:annotation>
<xsd:appinfo>
<map:java-type name="steelcase.server.ifaces.struct.ScsServiceHeader" />
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="callingSystem" nillable="true" type="xsd:string" />
<xsd:element name="requestID" nillable="true" type="xsd:string" />
<xsd:element name="serviceName" nillable="true" type="xsd:string" />
<xsd:element name="serviceVersion" nillable="true" type="xsd:string" />
<xsd:element name="tradingPartnerID" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="scsServiceHeader" nillable="true"
type="tns:ScsServiceHeader" />
<xsd:complexType name="CallService">
<xsd:annotation>
<xsd:appinfo>
<map:java-type name="steelcase.server.ifaces.struct.CallService" />
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="PDataXML" nillable="true" type="xsd:string" />
<xsd:element name="PInstructionsXML" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CallServiceResponse">
<xsd:annotation>
<xsd:appinfo>
<map:java-type name="steelcase.server.ifaces.struct.CallServiceResponse" />
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="callServiceResult" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</s:schema>
<s:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://systinet.com/xsd/SchemaTypes/"
xmlns:xns4="http://systinet.com/wsdl/steelcase/server/ifaces/struct/"
elementFormDefault="qualified"
targetNamespace="http://systinet.com/xsd/SchemaTypes/">
<xsd:import
namespace="http://systinet.com/wsdl/steelcase/server/ifaces/struct/" />
<xsd:element name="p0" nillable="true" type="xns4:CallService" />
<xsd:element name="CallServiceResponse_Response" nillable="true"
type="xns4:CallServiceResponse" />
</s:schema>
</wsdl:types>
<wsdl:message name="ServiceRootSoap_CallService_Response_Soap">
<wsdl:part name="response" element="s3:CallServiceResponse_Response" />
</wsdl:message>
<wsdl:message name="ServiceRootSoap_CallService__Request_Soap">
<wsdl:part name="p0" element="s3:p0" />
</wsdl:message>
<wsdl:message name="ServiceRootSoap_header_Soap">
<wsdl:part name="header_0" element="s2:scsServiceHeader" />
</wsdl:message>
<wsdl:message name="runtimeHeaders_0">
<wsdl:part name="header_0" element="s1:instance" />
<wsdl:part name="header_1" element="s0:TxId" />
</wsdl:message>
<wsdl:portType name="ServiceRootSoap">
<wsdl:operation name="CallService" parameterOrder="p0">
<wsdl:input message="tns:ServiceRootSoap_CallService__Request_Soap" />
<wsdl:output message="tns:ServiceRootSoap_CallService_Response_Soap" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceRootSoap" type="tns:ServiceRootSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="CallService">
<map:java-operation name="CallService"
signature="KExzdGVlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2U7KUxzd
GVlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2VSZXNwb25zZTs="
xmlns:map="http://systinet.com/mapping/" />
<soap:operation
soapAction="http://webservices.hedberg.comServiceRootSoap#CallService?KExzdG
VlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2U7KUxzdGVlbGNhc2Uvc2Vydm
VyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2VSZXNwb25zZTs=" style="document" />
<wsdl:input>
<soap:body use="literal" parts="p0" />
<soap:header message="tns:ServiceRootSoap_header_Soap" part="header_0"
use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts="response" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServiceRootSoap">
<wsdl:port name="ServiceRootSoap" binding="tns:ServiceRootSoap">
<soap:address location="http://<snipped>/wasp/ServiceRoot" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
------------------------------- END OF WSDL
file ----------------------------------
> Hi Jerome,
>
[quoted text clipped - 24 lines]
> Message-ID: <OpeVQCl4EHA.2452@TK2MSFTNGP14.phx.gbl>
> Newsgroups:
microsoft.public.dotnet.framework.webservices,microsoft.public.dotnet.framew
> ork.webservices.enhancements,microsoft.public.webservices
> NNTP-Posting-Host: 66.45.236.227
> Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14
> phx.gbl
> Xref: cpmsftngxa10.phx.gbl
[quoted text clipped - 58 lines]
> ---- FROM reference.vb -------------------------------
> <System.Web.Services.Protocols.SoapHeaderAttribute("scsServiceHeader"), _
System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://webservice
> s.hedberg.comServiceRootSoap#CallService?KExzdGVlbGNhc2Uvc2VydmV"& _
"yL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2U7KUxzdGVlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdH
> J1Y3Q"& _
>
> "vQ2FsbFNlcnZpY2VSZXNwb25zZTs=",
> Use:=System.Web.Services.Description.SoapBindingUse.Literal,
> ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Bare)>
> _Public Function
CallService(<System.Xml.Serialization.XmlElementAttribute([Namespace]:="http
> ://systinet.com/xsd/SchemaTypes/", IsNullable:=true)> ByVal p0 As
> CallService) As
<System.Xml.Serialization.XmlElementAttribute("CallServiceResponse_Response"
> , [Namespace]:="http://systinet.com/xsd/SchemaTypes/", IsNullable:=true)>
> CallServiceResponse
[quoted text clipped - 6 lines]
>
> .........
<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://systinet.com
> /wsdl/steelcase/server/ifaces/struct/")> _
>
[quoted text clipped - 130 lines]
>
> <map:java-operation name="CallService"
signature="KExzdGVlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2U7KUxzd
> GVlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2VSZXNwb25zZTs="
> xmlns:map="http://systinet.com/mapping/" />
>
> <soap:operation
soapAction="http://webservices.hedberg.comServiceRootSoap#CallService?KExzdG
VlbGNhc2Uvc2VydmVyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2U7KUxzdGVlbGNhc2Uvc2Vydm
> VyL2lmYWNlcy9zdHJ1Y3QvQ2FsbFNlcnZpY2VSZXNwb25zZTs=" style="document" />
>
[quoted text clipped - 30 lines]
>
> ---------- END OF from the WSDL -----------------------------------------
Dan Rogers - 16 Dec 2004 20:41 GMT
Hi Jerome,
The relevant schema is this one:
<s:schema
xmlns:tns="http://systinet.com/wsdl/steelcase/server/ifaces/struct/"
xmlns:map="http://systinet.com/mapping/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://systinet.com/wsdl/steelcase/server/ifaces/struct/">
<xsd:complexType name="ScsServiceHeader">
<xsd:sequence>
<xsd:element name="callingSystem" nillable="true" type="xsd:string" />
<xsd:element name="requestID" nillable="true" type="xsd:string" />
<xsd:element name="serviceName" nillable="true" type="xsd:string" />
<xsd:element name="serviceVersion" nillable="true" type="xsd:string" />
<xsd:element name="tradingPartnerID" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="scsServiceHeader" nillable="true"
type="tns:ScsServiceHeader" />
<xsd:complexType name="CallService">
<xsd:sequence>
<xsd:element name="PDataXML" nillable="true" type="xsd:string" />
<xsd:element name="PInstructionsXML" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CallServiceResponse">
<xsd:sequence>
<xsd:element name="callServiceResult" nillable="true" type="xsd:string"
/>
</xsd:sequence>
</xsd:complexType>
</s:schema>
I've removed some of the annotations to make it clearer. Now, here is what
you say the XML that you are manually creating looks like:
<PDataXML xmlns="http://systinet.com/wsdl/steelcase/server/ifaces/struct/">
<customerGeneralInquiryRequests xmlns="">
It really is hard to work from this snippet, since PDataXml should NOT have
children, at least not according to this schema.
So I do think that a) The XML you are sending is not interface compliant.
I'd need to see the SOAP payload you are sending to make sure, but on first
glance, I'd expect to see that customerGeneralInquiryRequest to have some
namespace. As you've created it, it appears to be an un-namespaced child of
PDataXml - but we've already established that the PDataXml element should
not have any child elements.
So the question comes down to: How are you creating this XML, and why have
you chosen to make PDataXml have child elements in the non-namespace?
Since I'm positive you intend to make the XML represent the format expected
by the service, I'd have to say without looking that whatever code you've
created to generate this XML stream is just plain not up to spec.
Why did you decide to change the generated proxy code that add-web
reference created? It likely was workable as generated, and kept you from
having to play with XML.
Regards
Dan