Hi

I used wsdl2java to generate my client classes. My call looks like this:
net.skats.services.GeoPlacesSoapStub binding;
       try {
           binding = (net.skats.services.GeoPlacesSoapStub)
new net.skats.services.GeoPlacesLocator().getGeoPlacesSoap();
       }
       catch (javax.xml.rpc.ServiceException jre) {
           if(jre.getLinkedCause()!=null)
               jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
       }
       assertNotNull("binding is null", binding);

       // Time out after a minute
       binding.setTimeout(60000);

       // Test operation
       net.skats.services.GeoPlaceDistance[] value = null;
SOAPHeaderElement headerElement = new SOAPHeaderElement("", "AuthenticationHeader");
       MessageElement sessionTag = new MessageElement("", "SessionID");
sessionTag.setValue("asZDeyh6f1/eNbQfBOyzBtlXVq6tEjKFEuDdUlHxh41DmxaS/NRJUhapHGlujsT3X02k4UTsZ/2tOrLTAOfXQKWop1BNKlBo");
       headerElement.addChildElement(sessionTag);
       binding.setHeader(headerElement);
value = binding.getPlacesWithin(new java.lang.String(), new java.lang.String(), 0, net.skats.services.GeoPlaceType.ZipCode);

The service expects the following in the header:

<soap:Header> <tns:AuthenticationHeader id="h_id1"> <SessionID xsi:type="xsd:string">YOUR_UNIQUE_ID</SessionID> </tns:AuthenticationHeader>
        </soap:Header>



However, I am getting the following fault:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.Exception: Subscription status is Subscription ID is empty at skats.Services.Geo.ServiceBase.get_Subscription() in C:\projects\geoservices\source\server\ServiceBase.cs:line 65 at skats.Services.Geo.ServiceBase.get_SubscriptionLevel() in C:\projects\geoservices\source\server\ServiceBase.cs:line 28 at skats.Services.Geo.GeoPlaces.GetPlacesWithin(String place, String state, Single distance, GeoPlaceType placeTypeToFind) in C:\projects\geoservices\source\server\placelookup.asmx.cs:line 55
  --- End of inner exception stack trace ---


What do I have to do to give the correct header? How do I see the actual message I am sending out?
Any help is greatly appreciated.

--
Janos Mucsi


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to