• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Authenticate JDEdwards User in Published business service

karthik9891

Active Member
I'm relatively new to JDE and using jde demo instance (with JDeveloper and weblogic server) for my learning purposes to see how business services works. My question is how to pass jde user credentials from an external non jde application to a published business service to authenticate users. If I try to access the deployed published business service in weblogic after logging into the solution explorer, I'm getting the intended response. But, If I try to access the same published business service without logging into the solution explorer, I get "Credentials could not be validated from the message or configuration file". Looking through the web, I see the E1loginModule is enabled when a published business service is packaged and deployed into the weblogic server. So,my understanding is every published business services that is deployed to weblogic is secured by default. Any help or insight on how to pass the credentials from the client application to published business services or settings that I need to make in the weblogic application server/published business services to accept the credentials?
 

nkuebelbeck

VIP Member
ws-security is used in the soap document

here is an example of a soap header.

<soapenv: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/" soapenv:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:password>password</wsse:password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
 

karthik9891

Active Member
@nkuebelbeck.. Thanks for your reply.. just have one question. Should I've to attach any security policies to my published business service deployed in weblogic for the client application to pass the credentials?
 

karthik9891

Active Member
@nkuebelbeck .. Thanks that's what I mea..
1. Can I pass even the environment and role in the SOAP header you mentioned ? If so, should be a part of username itself like "DN=USER,ENV=DEMO,ROLE=*ALL" or is it different?
2. Once authenticated, I see a security token that's generated. For subsequent requests, how do I pass the token alone in the SOAP header for authorization?
 

nkuebelbeck

VIP Member

karthik9891

Active Member
I tried passing the credentials in the SOAP header. Below is my SOAP request.

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S: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/">
<wsse:UsernameToken>
<wsse:Username>DEMO</wsse:Username>
<wsse:password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">DEMO</wsse:password>
</wsse:UsernameToken>
</wsse:Security>
</S:Header>
<S:Body>
<getItemElement xmlns="http://oracle.e1.bssv.JP55IT/">
<identifierShortItem>60003</identifierShortItem>
</getItemElement>
</S:Body>
</S:Envelope>

But I'm getting the following issue

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Failed to invoke end component oracle.e1.bssv.JP55IT.ItemManager (POJO), operation=getItem
-> Failed to invoke method
-> Credentials could not be validated from message or from configuration file.

Not sure what I'm missing here...
 

karthik9891

Active Member
If I give an input from the SOAP UI without logging in to the fat client, I get the following error.
Please find the attached screenshots on request/response

Request:-

Request.jpg

Response:-
Response.jpg

SOAP Request portion by default doesn't include SOAP header. How can I include that to make them available as a part of SOAP request when using this SOAP UI?
Any help or directions on this would really be helpful... :(
 

Attachments

SarahMQ

Member
Hi karthik9891,

yes, you can include the header in SOAPUI , i have add this portion before the body tag as follow:
"

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eek:rac="http://oracle.e1.bssv.JP550009/">
<soapenv: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/"
soapenv: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>USERNAME</wsse:Username>
<wsse:password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
"
 
Top