Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Help needed - Problem in calling SOAP service and getting response with Sudo.js

$
0
0

Hi All,

I have a problem in calling the SOAP service and getting the response using Sudo.js. Not sure where am making the mistake. Someone pls look into the code and help me how to make it work. Code snippets are:

soap.js

Titanium.include('suds.js');
 
var window = Ti.UI.currentWindow;
 
var label = Ti.UI.createLabel({ 
    top: 10,
    left: 10,
    width: 'auto',
    height: 'auto',
    text: 'Displaying Details'
});
 
window.add(label);
 
 
var url = "http://172.16.3.124:7001/soa-infra/services/default/ShipConsoleServices!1.0*soa_9f2bddf3-6cf2-4a39-9ab0-29fe49709716/shipmentinfoservice_client_ep";
var callparams = {
        ShipmentInfoService: '_DeliveryNumber'
 
};
 
Ti.API.info("Sending the Request");
var suds = new SudsClient({
    endpoint: url,
    targetNamespace: 'http://xmlns.oracle.com/SCServices/ShipConsoleServices/ShipmentInfoService/'
});
Ti.API.info("Invoking the response");
try {
    suds.invoke('ShipmentInfoServiceRequestMessage', callparams, function(xmlDoc) {
 
        var results = xmlDoc.documentElement.getElementsByTagName('ShipmentInfoService');
        if (results && results.length>0) {
            var result = results.item(0);
            label.text = 'Order Number ' + results.item(0).text + 'orderNumber';
        } else {
            label.text = 'Oops, could not determine result of SOAP call.';
        }
    });
} catch(e) {
    Ti.API.error('Error: ' + e);
}
And here is my SOAP:
<wsdl:definitions name="ShipmentInfoService" targetNamespace="http://xmlns.oracle.com/SCServices/ShipConsoleServices/ShipmentInfoService">
<wsdl:documentation>
<abstractWSDL>http:// INA241QFLF.appsahyd.com:7001/soa-infra/services/default/ShipConsoleServices!1.0/ShipmentInfoService.wsdl</abstractWSDL>
</wsdl:documentation>
<plnk:partnerLinkType name="ShipmentInfoService">
<plnk:role name="ShipmentInfoServiceProvider" portType="client:ShipmentInfoService"/>
</plnk:partnerLinkType>
<wsdl:types>
<schema>
<import namespace="http://xmlns.oracle.com/SCServices/ShipConsoleServices/ShipmentInfoService" schemaLocation="http://172.16.3.124:7001/soa-infra/services/default/ShipConsoleServices!1.0*soa_9f2bddf3-6cf2-4a39-9ab0-29fe49709716/shipmentinfoservice_client_ep?XSD=xsd/ShipmentInfoService.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="ShipmentInfoServiceRequestMessage">
<wsdl:part name="payload" element="client:process"/>
</wsdl:message>
<wsdl:message name="ShipmentInfoServiceResponseMessage">
<wsdl:part name="payload" element="client:processResponse"/>
</wsdl:message><wsdl:portType name="ShipmentInfoService">
<wsdl:operation name="process">
<wsdl:input message="client:ShipmentInfoServiceRequestMessage"/>
<wsdl:output message="client:ShipmentInfoServiceResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ShipmentInfoServiceBinding" type="client:ShipmentInfoService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process">
<soap:operation style="document" soapAction="process"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="shipmentinfoservice_client_ep">
<wsdl:port name="ShipmentInfoService_pt" binding="client:ShipmentInfoServiceBinding">
<soap:address location="http://172.16.3.124:7001/soa-infra/services/default/ShipConsoleServices!1.0*soa_9f2bddf3-6cf2-4a39-9ab0-29fe49709716/shipmentinfoservice_client_ep"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I am getting (TiHttpClient-1) [2675,64746] HTTP Error (org.apache.http.client.HttpResponseException): Internal Server Error while running the app.

Please help me to resolve this issue.

Regards Varma


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>