Skip to Content

What is the problem in the wsdl call?

Hi experts,

I am working a project with the android, I want to call the webservice of the BYD.

1. I am suring that the calling of the "soapUI" is successful, and the xml request is :

http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob=" http://sap.com/xi/SAPGlobal20/Global">
<soapenv:Header/>
<soapenv:Body>
<glob:SupplierByElementsQuery_sync>
<!--Optional:-->
<SupplierSelectionByElements>
<!--Zero or more repetitions:-->
<SelectionByInternalID>
<!--Optional:-->
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
<!--Optional:-->
<LowerBoundaryIdentifier>1000171</LowerBoundaryIdentifier>
<!--Optional:-->
<UpperBoundaryIdentifier>1000175</UpperBoundaryIdentifier>
</SelectionByInternalID>
</SupplierSelectionByElements>
<!--Optional:-->
<ProcessingConditions>
<!--Optional:-->
<QueryHitsMaximumNumberValue>10</QueryHitsMaximumNumberValue>
<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
</ProcessingConditions>
</glob:SupplierByElementsQuery_sync>
</soapenv:Body>
</soapenv:Envelope>

2. I using the ksoap2 in eclipse,and the code is:

String soapRequestData = ""
+ " http://schemas.xmlsoap.org/soap/envelope/\" xmlns:glob=\" http://sap.com/xi/SAPGlobal20/Global\">"
+ " <soapenv:Header/>"
+ " <soapenv:Body>"
+ " <glob:SupplierByElementsQuery_sync>"
+ " <SupplierSelectionByElements>"
+ " <SelectionByInternalID>"
+ " <InclusionExclusionCode>I</InclusionExclusionCode>"
+ " <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>"
+ " <LowerBoundaryIdentifier>1000171</LowerBoundaryIdentifier>"
+ " <UpperBoundaryIdentifier>1000175</UpperBoundaryIdentifier>"
+ " </SelectionByInternalID>"
+ " </SupplierSelectionByElements>"
+ " <ProcessingConditions>"
+ " <QueryHitsMaximumNumberValue>10</QueryHitsMaximumNumberValue>"
+ " <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>"
+ " </ProcessingConditions>"
+ " </glob:SupplierByElementsQuery_sync>"
+ " </soapenv:Body>"
+ "</soapenv:Envelope>";

SoapObject soapObject = new SoapObject(targetNameSpace,FindByElements);
soapObject.addProperty("xml",soapRequestData);

SoapSerializationEnvelope envelop = new SoapSerializationEnvelope(SoapEnvelope.VER11);
// 将soapObject对象设置为envelop对象,传出消息
envelop.dotNet = true;
MarshalDouble md = new MarshalDouble();
envelop.implicitTypes = true;
md.register(envelop);
envelop.setOutputSoapObject(soapObject);

HttpTransportSE httpSE = new HttpTransportSE(WSDL);
httpSE.debug = true;
List<HeaderProperty> headers = new ArrayList<HeaderProperty>();
headers.add(new HeaderProperty("Authorization", "Basic X1RFU1Q6UHA4MzAyMDQ="));
headers.add(new HeaderProperty("Username", "_TEST"));
headers.add(new HeaderProperty("Password", "****0204"));

httpSE.call(URL, envelop, headers);
//httpSE.call(targetNameSpace + FindByElements, envelop);
// // 得到远程方法返回的SOAP对象
SoapObject resultObj = (SoapObject) envelop.getResponse();

3. the problem is:

05-23 08:41:35.623: W/System.err(669): SoapFault - faultcode: 'soap-env:Client' faultstring: 'Web service processing error; more details in the web service error log on provider side (UTC timestamp 20170523084322; Transaction ID 00163E0F423E1EE78FF27C18D074DD47)' faultactor: 'null' detail: org.kxml2.kdom.Node@412687f0

4. I think the problem maybe in the xml input to the soap object, but I don't know where it is?

Who an hlep me?

Thanks a lot.

Benny

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 26 at 06:32 AM
    Add comment
    10|10000 characters needed characters exceeded