PDA

View Full Version : Empty SOAP Response


gcameo
27-04-09, 13:33
I am trying to make a SOAP call as part of an intergration work I am doing but I am not getting any response back. I am a newbie so I maybe missing something obvious but any form of help will be greatly appreciated. I have pasted the soap logs here

OUT GOING REQUEST:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<ns2:UserAuthentication xmlns:ns2="http://api.productserve.com/">
<iId>[USER ID]</iId>
<sPassword>[HASH V2 ID]</sPassword>
<sType>affiliate</sType>
</ns2:UserAuthentication>
<ns2:getQuota xmlns:ns2="http://api.productserve.com /">
true
</ns2:getQuota>
</S:Header>
<S:Body>
<ns2:getMerchantProduct xmlns:ns2="http://api.productserve.com/">
<iMerchantId>1256</iMerchantId>
<sMerchantProductId>14452708</sMerchantProductId>
</ns2:getMerchantProduct>
</S:Body>
</S:Envelope>

INCOMING REQUEST:

EMPTY

If I deliberately fail authentication, it flags up which means i am connecting to the service but I don't understand why I don't get anything back. Examples of soap calls that work will be greatly appreciated
Please help.

Andy
27-04-09, 19:16
Without seeing you actual code, I can't say, but I have had similar problems in the past.

Try going through all the different passwords there are in your account
Try changing the Version number too. for productserve, the WSDL should be:
http://api.productserve.com/v2/ProductServeService?wsdl

But if you're using the api for getting reports or other account data, that should be V3 (I think, Ill have to check)

And make sure your "User Type" is "affiliate" and not "merchant"

hope you get it sorted

gcameo
27-04-09, 22:09
This is the only code I have written as I am now only testing and want to test functionality first. I generated the client stubs using JAX_WS. As I said, if i change the password, it breaks and gives authentication failure. However, if I use the correct one, i get nothing back

ApiService affiliateService = new ApiService();
affiliateService.setHandlerResolver(handlerResolve r);
ApiPortType affiliatePort = affiliateService.getApiPort();

UserAuthentication user = new UserAuthentication();
user.setSPassword("MY HASH V"2");
user.setIId(012345);
user.setSType(UserType.AFFILIATE);
try {
affList = affiliatePort.getMerchantProduct(1256, "14452708", user, true,

null);
} catch (ApiException_Exception ex) {
ex.printStackTrace();
}

Andy
28-04-09, 11:00
Ah poo, I have no idea what JAX_WS is (off to wiki), nor what that code does.
I'll have to excuse myself from this one Im afraid mate.

If you do php, there are plenty of working examples in the API download that might give you a clue. I was going to provide a link, but I can't find it (?Admin? Has the download been removed?)

Sorry I couldn't be of more help, tis the problem with having so many different languages, we don't all speak them all.

*edit*
Ah, it's a Java thing! Cool!
Still don't know anything about it, but good luck anyway.