.NET web service consuming an E1 business service

dcs

Member
I created an E1 published business service/internal business service to call an E1 business function. I am attempting to consume the published business service in a .NET web service.

I added a web reference to the published business service in the .NET project and coded the call to the published busines service public method. My question is: how do I pass in the E1 credentials (user id, password, environment and possibly role)?

example of method names:--------------------------------------------
public ConfirmAddCostCode addCostCode(AddCostCode vo) throws BusinessServiceException {
return addCostCode(null,null,vo);
}

protected ConfirmAddCostCode addCostCode(IContext context, IConnection connection, AddCostCode vo) throws BusinessServiceException {
--------------------------------------------------------------------

I changed the protected method to public, but that generated a business services build error (IConnection parameter is an invalid parameter - not a java bean).

I am new to business services and wasn't sure how E1 credential processing is handled.
 
To consume the published business service in .NET you need a WSDL file or a service endpoint which can help you to generate a XML template.
Ensure that you set security in the header which will generate template with login details to E1.
You will have to provide a valid user id and passwd when you call the service.

hope this helps.

Chan
 
I think I need to back up a step. Am I generating the XML Template in JDeveloper, and then using soft-coding? Or, is the XML template being generated somewhere else?
 
The security information needs to be passed to the web service (published business service) in the header of the SOAP message in the <wsse:Security> token, eg:
<font color="green">
<soap:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Username>USER</wsse:Username>
<wsse:password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASS</wsse:password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
</font>
See this article for more information: http://www.oracle.com/technology/tech/java/newsletter/articles/wsaudit/ws_audit.html

This SOAP message, the body of which includes the data that you're passing to the web service, is generated by your web reference proxy client that you've created in .NET. However, I'm not sure how you do this, as I can't test it (when I try to create the web reference from a published business service's WSDL document, it fails saying that sproxy.exe does not support extension of complexType, which exists in the WSDL). However, this page may help: http://www.devx.com/dotnet/Article/19986/1954

As for your question about soft-coding, I wouldn't expect you to be using this in a published business service. These are typically used for business services which consume an external web service in order to specify the endpoint URL.

Dave
 
Back
Top