All,
I suspect that the namespace is not being set correctly for two
authentication elements that I am sending in a SOAP header. I want to
use wsmonitor to try to debug this.
I start running wsmonitor locally, listening to localhost:4040. Then I
attempt to configure my stub to go to my wsmonitor proxy instead of the
actual endpoint.
Here's my main, client level code:
public static void main(java.lang.String args[]) {
try {
InventoryServiceStub stub =
new InventoryServiceStub
("https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.a
smx?WSDL");
InventoryServiceStub.APICredentials0 apiCredentials = new
InventoryServiceStub.APICredentials0();
InventoryServiceStub.APICredentials credential_data = new
InventoryServiceStub.APICredentials();
credential_data.setDeveloperKey("key");
credential_data.setPassword("pass");
apiCredentials.setAPICredentials(credential_data);
InventoryServiceStub.Ping req = new
InventoryServiceStub.Ping();
InventoryServiceStub.PingResponse resp = stub.Ping(req,
apiCredentials);
System.err.println(resp.getPingResult());
}
catch(Exception e){
e.printStackTrace();
System.err.println("\n\n\n");
}
}
And here is where I'm trying to redirect to the proxy, inside of the
call
"InventoryServiceStub.Ping req = new InventoryServiceStub.Ping();"
public static final javax.xml.namespace.QName MY_QNAME = new
javax.xml.namespace.QName(
// "http://api.channeladvisor.com/webservices/",
"http://localhost:4040/webservices/",
"Ping",
"ns1");
My questions are as follows:
1) Do I need to proxy the URL for the WSDL - I don't think so, but am
not sure.
2) Do I need to proxy something else in order to get the ping request
to hit my proxy?
Thanks,
Wes