> Given you have complete control of the server I would suggest you 
> re-deploy your web service as doc/literal. 
> doc/literal is supported in AxisCPP far better due to our commitment to 
> being ws-i compliant.

Thanks for the tip, I've discovered ws-i.org and I'm doing my best to follow 
their guidelines as well.

I'm doing doc/literal for my service now and I've turned off multipart encoding 
on my Axis Java service.  I know I'm getting close, but something is still 
wrong 
with my WSDL.  My test client is getting a NULL response from the generated 
stub:

int main()
{
    try {
      LevelsServicePortType* theService =
        new 
LevelsServicePortType("http://localhost:8080/nile/services/LevelsServicePort";);
      tLevelCollection* thePtr = theService->getFxLevelsForShot();
      if( NULL==thePtr )
      {
          cout << "thePtr is null" << endl;
      }
    } catch(AxisException& e) {
// etc.

Here's the new SOAP response:

<?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>
     <getFxLevelsForShotResponse 
xmlns="http://www.dreamworks.com/LevelService/";>
        <ns1:LevelCollectionResponse 
xmlns:ns1="http://www.dreamworks.com/nile/schema/";>
           <ns1:Element>
              <ns1:Prod>MAD</ns1:Prod>
              <ns1:Name>Dust</ns1:Name>
           </ns1:Element>
           <ns1:Element>
              <ns1:Prod>MAD</ns1:Prod>
              <ns1:Name>Fire</ns1:Name>
           </ns1:Element>
        </ns1:LevelCollectionResponse>
     </getFxLevelsForShotResponse>
  </soapenv:Body>
</soapenv:Envelope>

This generated call to getCmplxObject below returns null.  I don't see the 
string literal "result" in the SOAP response above, though it isin the WSDL.  
Seems suspicious.

if(AXIS_SUCCESS == m_pCall->checkMessage("getFxLevelsForShotResponse", 
"http://www.dreamworks.com/LevelService/";))
{
  pReturn = 
  (tLevelCollection*)m_pCall->getCmplxObject((void*) 
  Axis_DeSerialize_tLevelCollection,
  (void*) Axis_Create_tLevelCollection,
  (void*) Axis_Delete_tLevelCollection,
  "result", 0);
}

I appreciate any help in finding my error.
thanks again,
Hernan

Here's the WSDL the cpp stub is generated from:

<?xml version="1.0"?>

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/";
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 xmlns:tns="http://www.dreamworks.com/LevelService/";
 targetNamespace="http://www.dreamworks.com/LevelService/";
 xmlns:typens="http://www.dreamworks.com/nile/schema/";>

 <types>
   <xsd:schema targetNamespace="http://www.dreamworks.com/nile/schema/";
       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
       elementFormDefault="qualified"
       attributeFormDefault="unqualified">

      <xsd:element name="LevelCollectionResponse" 
type="typens:tLevelCollection"/>
      <xsd:complexType name="tLevelCollection">
         <xsd:sequence>
            <xsd:element name="Element" type="typens:tLevel" minOccurs="0" 
maxOccurs="unbounded"/>
         </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="tLevel">
        <xsd:sequence>
           <xsd:element name="Prod" type="xsd:string"/>
           <xsd:element name="Name" type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>

   </xsd:schema>
 </types>

 <!-- message declns -->
 <message name="getFxLevelsForShotRequest"/>
 <message name="getFxLevelsForShotResponse">
   <part name="result" element="typens:LevelCollectionResponse"/>
 </message>

 <!-- port type declns -->
 <portType name="LevelsServicePortType">
   <operation name="getFxLevelsForShot">
     <input message="tns:getFxLevelsForShotRequest"/>
     <output message="tns:getFxLevelsForShotResponse"/>
   </operation>
 </portType>

 <!-- binding declns -->
 <binding name="LevelsXMLServiceSOAPBinding" type="tns:LevelsServicePortType">
   <soapbind:binding 
    transport="http://schemas.xmlsoap.org/soap/http/"; 
    style="rpc"/>
   <operation name="getFxLevelsForShot">
     <input name="getFxLevelsForShotRequest">
       <soapbind:body use="literal" 
namespace="http://www.dreamworks.com/LevelService/"/>
     </input>
     <output name="getFxLevelsForShotResponse"> 
       <soapbind:body use="literal" 
namespace="http://www.dreamworks.com/LevelService/"/>
     </output>
   </operation>
 </binding>

 <service name="LevelsXMLService">
    <port name="LevelsServicePort" binding="tns:LevelsXMLServiceSOAPBinding">
      <soap:address 
location="http://localhost:8080/nile/services/LevelsService"/>
    </port>
 </service>

</definitions>


Reply via email to