I'm not familiar with gSOAP. On 2/5/07, Vogel, Charles H <[EMAIL PROTECTED]> wrote:
Anne, Thank you for the quick response. I'm fairly new too this stuff so I have some basic questions(in Bold).First we have on our system: axis-1_1 & axis-1_2. Does it matter which of these I use? second I have the following at the top of my header file (TBSearch.h): //gsoap ns1 service name: BoldToolBoxSearch //gsoap ns1 service namespace: http://tbsearch.webbold.boeing //gsoap ns1 service location: http://bold-prod.cs.boeing.com //gsoap ns1 service executable: BoldTBSearchServer //gsoap ns1 service encoding: encoded //gsoap ns1 schema namespace: urn:BoldTBSearch //gsoap ns1 schema form: qualified And down further in the same header file I define ns3:docTypes,ns3:searchResults etc. In the same header file I define two methods: int ns1__Search( int searchSize, xsd__string request, xsd__string ata, xsd__string model, xsd__string airlineCode, xsd__string partNumber, xsd__string supplierName, xsd__string enterpriseCode, struct arrayOfdocTypes *docTypesin, struct arrayofSearchResults& searchResults ); And int ns1__SearchDocHits( xsd__string request, xsd__string ata, xsd__string model, xsd__string airlineCode, xsd__string partNumber, xsd__string supplierName, xsd__string enterpriseCode, struct arrayOfdocTypes *docTypesin, struct arrayOfDocHits& docHits ); None of the xsd_string variables like searchSize or ata etc are namespace qualified.Only my 3 complex types, searchResuls, docHits and docTypes are and they are using ns3 (eg ns3__DocHits). I could easily modify the header file to use just one namespace, ie I could change ns3__DocHits to be ns1__DocHits, but how would that fix the xsd__string variables? Here's the content of TEST.log: Accept socket 5 at port 44576 from IP 127.0.0.1 Initializing ID hashtable Initializing pointer hashtable Initializing Free namespace stack Free any remaining temp blocks Free attributes Free pointer hashtable Free ID hashtable Free namespace stack Free any remaining temp blocks Free attributes Free pointer hashtable Free ID hashtable Free ID hashtable Read 1784 bytes from socket 5 Waiting for response... HTTP status: POST / HTTP/1.0 HTTP header: Content-Type: text/xml; charset=utf-8 HTTP header: Accept: application/soap+xml, application/dime, multipart/related, text/* HTTP header: User-Agent: Axis/1.3 HTTP header: Host: localhost:31567 HTTP header: Cache-Control: no-cache HTTP header: Pragma: no-cache HTTP header: SOAPAction: "" Malloc 8 bytes at location 40046958 HTTP header: Content-Length: 1525 Finished HTTP header parsing Keep alive connection = 0 Target endpoint='http://localhost:31567/' New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40046a40->40046b80) First block Copy 256 bytes from 40046a48 to 40046b80 Next block End of block sequence, free all remaining blocks Push namespace binding (level=0) 'soapenv' 'http://schemas.xmlsoap.org/soap/envelope/' Push OK ('soapenv' matches 'SOAP-ENV' in namespace table) Push namespace binding (level=0) 'xsd' 'http://www.w3.org/2001/XMLSchema' Push OK ('xsd' matches 'xsd' in namespace table) Push namespace binding (level=0) 'xsi' 'http://www.w3.org/2001/XMLSchema-instance' Push OK ('xsi' matches 'xsi' in namespace table) Tags and (default) namespaces match: 'soapenv:Envelope' 'SOAP-ENV:Envelope' Begin element found (level=1) 'soapenv:Envelope'='SOAP-ENV:Envelope' Tags and (default) namespaces match: 'soapenv:Body' 'SOAP-ENV:Body' Begin element found (level=2) 'soapenv:Body'='SOAP-ENV:Body' New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40046db0->40046ef0) First block Copy 256 bytes from 40046db8 to 40046ef0 Next block End of block sequence, free all remaining blocks Push namespace binding (level=2) 'ns1' 'urn:BoldTBSearch' Push OK ('ns1' matches 'ns1' in namespace table) Tags and (default) namespaces match: 'ns1:Search' 'ns1:Search' Tags and (default) namespaces match: 'ns1:Search' 'ns1:Search' Begin element found (level=3) 'ns1:Search'='ns1:Search' Enter id='' type=17 loc=6fbf5208 size=36 level=0 New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40047028->40047140) First block Copy 256 bytes from 40047030 to 40047140 Next block End of block sequence, free all remaining blocks Tags 'searchSize' and 'ns1:searchSize' match but namespaces differ Unknown element 'searchSize' (level=3, 0) IGNORING element 'searchSize' New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40047250->40047368) First block Copy 256 bytes from 40047258 to 40047368 Next block End of block sequence, free all remaining blocks Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'request' and 'ns1:request' match but namespaces differ Unknown element 'request' (level=3, 1) IGNORING element 'request' End element found (level=3) 'request'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'ata' and 'ns1:ata' match but namespaces differ Unknown element 'ata' (level=3, 1) IGNORING element 'ata' End element found (level=3) 'ata'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'model' and 'ns1:model' match but namespaces differ Unknown element 'model' (level=3, 1) IGNORING element 'model' End element found (level=3) 'model'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'airlineCode' and 'ns1:airlineCode' match but namespaces differ Unknown element 'airlineCode' (level=3, 1) IGNORING element 'airlineCode' End element found (level=3) 'airlineCode'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'partNumber' and 'ns1:partNumber' match but namespaces differ Unknown element 'partNumber' (level=3, 1) IGNORING element 'partNumber' End element found (level=3) 'partNumber'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'supplierName' and 'ns1:supplierName' match but namespaces differ Unknown element 'supplierName' (level=3, 1) IGNORING element 'supplierName' End element found (level=3) 'supplierName'='' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'enterpriseCode' and 'ns1:enterpriseCode' match but namespaces differ Unknown element 'enterpriseCode' (level=3, 1) IGNORING element 'enterpriseCode' End element found (level=3) 'enterpriseCode'='' New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40047478->40047590) First block Copy 256 bytes from 40047480 to 40047590 Next block End of block sequence, free all remaining blocks Push namespace binding (level=3) 'ns2' 'urn:BoldTBSearch/ns3.xsd' Push OK ('ns2' matches 'ns3' in namespace table) Push namespace binding (level=3) 'soapenc' 'http://schemas.xmlsoap.org/soap/encoding/' Push OK ('soapenc' matches 'SOAP-ENC' in namespace table) Tags and (default) namespaces match: 'soapenc:arrayType' 'SOAP-ENC:arrayType' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags 'docTypesin' and 'ns1:docTypesin' match but namespaces differ Unknown element 'docTypesin' (level=3, 1) IGNORING element 'docTypesin' Unknown element 'docTypesin' (level=4, 0) IGNORING element 'docTypesin' Popped namespace binding (level=3) 'soapenc' Popped namespace binding (level=3) 'ns2' End element found (level=3) 'docTypesin'='' Popped namespace binding (level=2) 'ns1' End element found (level=2) 'ns1:Search'='ns1:Search' New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40047478->400476c8) First block Copy 256 bytes from 40047480 to 400476c8 Next block End of block sequence, free all remaining blocks New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 256 bytes (40047800->40047918) First block Copy 256 bytes from 40047808 to 40047918 Next block End of block sequence, free all remaining blocks Push namespace binding (level=2) 'soapenc' 'http://schemas.xmlsoap.org/soap/encoding/' Push OK ('soapenc' matches 'SOAP-ENC' in namespace table) Push namespace binding (level=2) 'ns3' 'urn:BoldTBSearch/ns3.xsd' Push OK ('ns3' matches 'ns3' in namespace table) Tags and (default) namespaces match: 'soapenc:root' 'SOAP-ENC:root' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' lookup type id='#id1' NOT FOUND! Need to get it from xsi:type lookup type id='' NOT FOUND! Need to get it from xsi:type Tags and (default) namespaces match: 'ns3:docTypes' 'ns3:docTypes' Begin element found (level=3) 'multiRef'='' Enter id='#id1' type=7 loc=00000000 size=16 level=0 soap_instantiate_ns3__docTypes(-1, ns3:docTypes, ) Instantiated location=400469f8 Lookup entry id='#id1 for location=400469f8' New entry id='#id1' type=7 size=16 level=0 location=400469f8 Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags match: 'docType' 'docType' Begin element found (level=4) 'docType'='docType' Reading string content New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 4 bytes (40047a78->00000000) Malloc 8 bytes at location 40047bb8 First block Copy 4 bytes from 40047a80 to 40047bb8 Next block End of block sequence, free all remaining blocks Enter id='' type=6 loc=40047bb8 size=4 level=0 End element found (level=3) 'docType'='docType' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags match: 'issueDate' 'issueDate' Begin element found (level=4) 'issueDate'='issueDate' Reading string content New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 5 bytes (40047c00->00000000) Malloc 8 bytes at location 40047ac8 First block Copy 5 bytes from 40047c08 to 40047ac8 Next block End of block sequence, free all remaining blocks Enter id='' type=6 loc=40047ac8 size=4 level=0 End element found (level=3) 'issueDate'='issueDate' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' Tags match: 'issueNumber' 'issueNumber' Begin element found (level=4) 'issueNumber'='issueNumber' Reading string content New block sequence (prev=00000000) Push block of 256 bytes (256 bytes total) Save all blocks in contiguous memory space of 5 bytes (40047c00->00000000) Malloc 8 bytes at location 40047b60 First block Copy 5 bytes from 40047c08 to 40047b60 Next block End of block sequence, free all remaining blocks Enter id='' type=6 loc=40047b60 size=4 level=0 End element found (level=3) 'issueNumber'='issueNumber' Popped namespace binding (level=2) 'ns3' Popped namespace binding (level=2) 'soapenc' End element found (level=2) 'multiRef'='' Push namespace binding (level=2) 'soapenc' 'http://schemas.xmlsoap.org/soap/encoding/' Push OK ('soapenc' matches 'SOAP-ENC' in namespace table) Tags and (default) namespaces match: 'soapenc:root' 'SOAP-ENC:root' Tags and (default) namespaces match: 'xsi:type' 'xsi:type' lookup type id='#id0' NOT FOUND! Need to get it from xsi:type lookup type id='' NOT FOUND! Need to get it from xsi:type Tags and (default) namespaces match: 'xsd:int' 'xsd:int' Begin element found (level=3) 'multiRef'='' Enter id='#id0' type=1 loc=00000000 size=4 level=0 Malloc 8 bytes at location 40046b38 Lookup entry id='#id0 for location=40046b38' New entry id='#id0' type=1 size=4 level=0 location=40046b38 Element content value='10000' Popped namespace binding (level=2) 'soapenc' End element found (level=2) 'multiRef'='' End element found (level=1) 'soapenv:Body'='SOAP-ENV:Body' Popped namespace binding (level=0) 'xsi' Popped namespace binding (level=0) 'xsd' Popped namespace binding (level=0) 'soapenv' End element found (level=0) 'soapenv:Envelope'='SOAP-ENV:Envelope' End of receive message ok Resolving forwarded data Resolution phase Resolution done Are you saying I should include another comment line like: //gsoap ns3 schema namespace:urn:BoldTBSearch How would that change the wsdl? When I run soapcpp2 -t -e TBSearch.h the wsdl file (BoldToolBoxSearch.wsdl) contains: <?xml version="1.0" encoding="UTF-8"?> <definitions name="BoldToolBoxSearch" targetNamespace="http://tbsearch.webbold.boeing" xmlns:tns="http://tbsearch.webbold.boeing" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns3="urn:BoldTBSearch/ns3.xsd" xmlns:ns1="urn:BoldTBSearch/" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <documentation> </documentation> <schema targetNamespace="urn:BoldTBSearch/ns3.xsd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns3="urn:BoldTBSearch/ns3.xsd" xmlns:ns1="urn:BoldTBSearch" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="docTypes"> <sequence> <element name="docType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <element name="issueDate" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <element name="issueNumber" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> </sequence> </complexType> <complexType name="searchResults"> <sequence> <element name="docType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="Reference" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="Model" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="Effectivity" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="RevNum" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="Location" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="HitHighLightXML" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="DocNum" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="RevDate" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="SubDocType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="CageCode" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> <element name="SupplierName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default="None"/> </sequence> </complexType> <complexType name="docHits"> <sequence> <element name="docType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <element name="num-hits" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> </sequence> </complexType> </schema> <schema targetNamespace="urn:BoldTBSearch" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns3="urn:BoldTBSearch/ns3.xsd" xmlns:ns1="urn:BoldTBSearch" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOfdocTypes"> <complexContent> <restriction base="SOAP-ENC:Array"> <sequence> <element name="item" type="ns3:docTypes" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="ns3:docTypes[]"/> </restriction> </complexContent> </complexType> <complexType name="ArrayOfsearchResults"> <complexContent> <restriction base="SOAP-ENC:Array"> <sequence> <element name="item" type="ns3:searchResults" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="ns3:searchResults[]"/> </restriction> </complexContent> </complexType> <complexType name="ArrayOfdocHits"> <complexContent> <restriction base="SOAP-ENC:Array"> <sequence> <element name="item" type="ns3:docHits" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="ns3:docHits[]"/> </restriction> </complexContent> </complexType> </schema> </types> <message name="SearchRequest"> <part name="searchSize" type="xsd:int"/> <part name="request" type="xsd:string"/> <part name="ata" type="xsd:string"/> <part name="model" type="xsd:string"/> <part name="airlineCode" type="xsd:string"/> <part name="partNumber" type="xsd:string"/> <part name="supplierName" type="xsd:string"/> <part name="enterpriseCode" type="xsd:string"/> <part name="docTypesin" type="ns1:ArrayOfdocTypes"/> </message> <message name="SearchResponse"> <part name="searchResults" type="ns1:ArrayOfsearchResults"/> </message> <message name="SearchDocHitsRequest"> <part name="request" type="xsd:string"/> <part name="ata" type="xsd:string"/> <part name="model" type="xsd:string"/> <part name="airlineCode" type="xsd:string"/> <part name="partNumber" type="xsd:string"/> <part name="supplierName" type="xsd:string"/> <part name="enterpriseCode" type="xsd:string"/> <part name="docTypesin" type="ns1:ArrayOfdocTypes"/> </message> <message name="SearchDocHitsResponse"> <part name="docHits" type="ns1:ArrayOfdocHits"/> </message> <portType name="BoldToolBoxSearchPortType"> <operation name="Search"> <documentation>Service definition of function ns1__Search</documentation> <input message="tns:SearchRequest"/> <output message="tns:SearchResponse"/> </operation> <operation name="SearchDocHits"> <documentation>Service definition of function ns1__SearchDocHits</documentation> <input message="tns:SearchDocHitsRequest"/> <output message="tns:SearchDocHitsResponse"/> </operation> </portType> <binding name="BoldToolBoxSearch" type="tns:BoldToolBoxSearchPortType"> <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="Search"> <SOAP:operation style="rpc" soapAction=""/> <input> <SOAP:body use="encoded" namespace="urn:BoldTBSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <SOAP:body use="encoded" namespace="urn:BoldTBSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="SearchDocHits"> <SOAP:operation style="rpc" soapAction=""/> <input> <SOAP:body use="encoded" namespace="urn:BoldTBSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <SOAP:body use="encoded" namespace="urn:BoldTBSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="BoldToolBoxSearch"> <documentation>gSOAP 2.7.3 generated service definition</documentation> <port name="BoldToolBoxSearch" binding="tns:BoldToolBoxSearch"> <SOAP:address location="http://bold-prod.cs.boeing.com/BoldTBSearchServer"/> </port> </service> </definitions> -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Sunday, February 04, 2007 1:47 PM To: [email protected] Subject: Re: Namespace issue between Gsoap & Axis One error in the schema definition: You must import the "urn:BoldTBSearch/ns3.xsd" namespace into the "urn:BoldTBSearch" namespace in order to reference the "ns3:docTypes", "ns3:searchResults", and "ns3:docHits" types. Also, I'm assuming you're using Axis 1.x. (Axis2 does not support SOAP Encoding.) It would help if you could supply a trace of the gSOAP message and the Axis message. Per the rules defined by the WS-I Basic Profile, the accessor elements that represent the parameters must be unqualified. If gSOAP is expecting the supplierName element to be qualified, that's a bug in gSOAP. Anne On 2/4/07, Vogel, Charles H <[EMAIL PROTECTED]> wrote: > Hi, I have developed a soap service using Gsoap that works fine when I > call te service from the gsoap client. I then used the Axis WSDL2Java > program to generate Java stubs from the WSDL generated by Gsoap. I > have the Java client running but when it calls the Gsoap method I see > in the Gsoap log file called TEST.log a bunch of messages saying: > > Tags 'supplierName' and 'ns1:supplierName' match but namespaces differ > Unknown element 'supplierName' (level=3, 1) IGNORING element > 'supplierName' > > Here supplierName is an xsd__string which is a typedef tochar*. But it > does not seem to matter what the type is. The namespaces differ and so > the element is ignored and comes through to the make empty/null even > though I know the Java client is setting it. > > Here's the two WSDL's , one on the Gsoap side and the other that I > generated by using Java2WSDL by pointing Java2WSDL at the Java code I > generated by running WSDL2Java against the Gsoap WSDL. > > <<GSOAP_WSDL.txt>> <<AXIS_WSDL.txt>> > > > Charlie Vogel > Bold Web Development > Work (206) 766-3856 Cell (206) 679-2699 M/S 2J-53 Email > <mailto:[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
