Hi,
I have a IS webService exposed to a third party and need to do basic authentication before we accept request. Other party use .Net.
We have created our custom SOAP handler for authentication as desribed in webMethods documentation.
I don’t know .Net, if anyone has any sample of sending authentication information while executing webService from .Net will be very helpful. Need to test if it work with IS. My webService and SOAP processor has given TNPartner ACL.
You didn’t mention which .Net language was being used to consume your web service.
For C# you would instantiate a NetworkCredential and use it on your web service call. This C# code fragment shows how to create a NetworkCredentials object and add it to a CredentialCache associated with two different URLs (soapEndpoints when you are working with web services).
[highlight=c#]
NetworkCredential myCred = new NetworkCredential(
SecurelyStoredUserName,SecurelyStoredPassword,SecurelyStoredDomain);
Once you have created your CredentialCache you need to add it to your web service stub. If your web service stub was called “ws”, the following code would do that:
We are using VB.NET for this and now we are getting the exception:
We did all the steps for authentication described as in :
SOAP_Developers_Guide_6.5.pdf – Chapter - 7
We gave TNPartner ACL to both to our SOAP processor and service.
But our partner says they get the exception and we also see it in server log as:
[ISS.0088.9134] Exception occurred while processing the body of the message
We change “watt.server.SOAP.enforceMsgPartNS=false” according to some old service request in advantage but no luck. We are using Integration Server V-6.5 in IBM AIX 5.3.
You should see some other error message in the error or server log that indicates what exception is occuring. It could be simply a authentication issue in which case you should see an “access denied” error in the IS server or error log.
It could also be that your authentication is working fine but the Flow service is throwing some type of exception.
Does the service work when you set the ACL for your custom soap processor to Anonymous?
Have you taken the very basic troubleshooting step of capturing the request and reply soap messages using a tool like PocketSoap TCPTrace?
If so, the SOAP response message will contain additional error details in the soap fault element.
Hi,
The service work fine with Anonymous ACL. Interestingly when I try from our internal network using the VS .Net 2005 it works. But it does not with 2003.
Hi,
It worked today. The WS client is not working properly and they are not using the new soap rpc processor. This is the reason why it was not working.
Is your question related to the webMethods Microsoft Package or to the original topic of this thread which was calling IS-provided web services from a .Net consumer?
Guys,
I am also facing same problem. I tried Mark’s suggestion, but Credentials method is not there for the stub. So not able to do "ws.Credentials = myCred ".
jtu100,
Could you please tell me what to put in the SOAP processor. What logic is required out there.
C# client call works for Anonymous ACL. I am using Visual studio 2008 and webMethods 7.12.
Thanks,
Sid
It’s done. I fgured out the process.
In visual studio 2008, way to add web reference is changed. Add service reference, Click Advance…, click Add web Reference. this will add web reference in the project.
Add following to call a webservice,
Creete stub
ICredentials icred = new NetworkCredential(uerid,password);
obj.Credentials = icred;
Console.WriteLine(stub.method name());
Console.ReadKey();
In webMethods 7.x, wrapper/ Custom SOAP processor is not required to handle authentication from .net based clients.