Discussion:
[jboss-user] [JBoss Web Services] - wsconsume, how to access HTTP Basic secured WSDL
Jochen Riedlinger
2012-10-05 11:55:35 UTC
Permalink
Jochen Riedlinger [https://community.jboss.org/people/j_ri] created the discussion

"wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/763467#763467

--------------------------------------------------------------
Hi,

I have to implement a webservice client for ou JEE application which accesses a webservice on a SAP system. The webservice's WSDL is secured with HTTP Basic authentication.
Unfortunately I couldn't find out how to set username and password when using the wsconsume goal of the

<groupId>org.jboss.ws.plugins</groupId>
<artifactId>maven-jaxws-tools-plugin</artifactId>

maven plugin for client code generation.


Can any body give me a hint how to solve this ( I already know that I can download the WSDL and imported XSDs manually and use a local copy of them......but this is not a good option)?

Thanks,
Jochen
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763467#763467]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
harald.kirschner
2013-06-03 07:49:03 UTC
Permalink
harald.kirschner [https://community.jboss.org/people/harald.kirschner] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/820896#820896

--------------------------------------------------------------
Hi Jochen,

I do have the same problem. Could you solve this problem already? Because I do not know how to fix it!

Thanks for your help,
   Harald
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820896#820896]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Jochen Riedlinger
2013-06-03 07:59:28 UTC
Permalink
Jochen Riedlinger [https://community.jboss.org/people/j_ri] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/820900#820900

--------------------------------------------------------------
Hello Harad,

unfortunately I couldn't solve it;-(
We use a workaround now: My colleagues from SAP development package the WSDLs und put them in our company (NEXUS based) maven repository. We (the Java dvelopers) take it from there using the maven-dependency-plugin.

This also has the advantage of using a "fix" version....

Hope this idea helps you,
Jochen
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820900#820900]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
harald.kirschner
2013-06-07 06:14:49 UTC
Permalink
harald.kirschner [https://community.jboss.org/people/harald.kirschner] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/821864#821864

--------------------------------------------------------------
Hi Jochen,

I solved the problem:
          UtilitiesDeviceERPSmartMeterCreateConfirmation_In_Service_Impl stub = new UtilitiesDeviceERPSmartMeterCreateConfirmation_In_Service_Impl();
            UtilitiesDeviceERPSmartMeterCreateConfirmation_In_PortType request = stub.getUtilitiesDeviceERPSmartMeterCreateConfirmation_BNDG();

          BindingProvider bp = (BindingProvider) request;
            bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, USER);
            bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, PASSWORD);

Maybe it helps for you, too.

Regards,
   Harald
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821864#821864]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Jochen Riedlinger
2013-06-10 07:24:23 UTC
Permalink
Jochen Riedlinger [https://community.jboss.org/people/j_ri] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/822217#822217

--------------------------------------------------------------
Hello Harald,

thanks, but I think your solution is for using the generated webservice(-stub) and setting username/password in your client code to do the "runtime" authentication, right?

My problem is that the WSDL is secured and the maven plugin cannot access the WSDL. So I cannot generate the stubs/ports.

Best regards,
Jochen
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822217#822217]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
harald.kirschner
2013-06-10 07:28:04 UTC
Permalink
harald.kirschner [https://community.jboss.org/people/harald.kirschner] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/822219#822219

--------------------------------------------------------------
Hi Jochen,

OK, I see! Maybe you just have to set

| | | | <sysproperty key="javax.xml.rpc.security.auth.username" value="your_username" /> |
| | | | <sysproperty key="javax.xml.rpc.security.auth.password" value="your_password" /> |

I use these settings when generating client stubs with weblogic! Maybe they work for JBoss, too!

Harald
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/822219#822219]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-07-12 16:07:54 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: wsconsume, how to access HTTP Basic secured WSDL"

To view the discussion, visit: https://community.jboss.org/message/827791#827791

--------------------------------------------------------------
Currently, you'd need to make a local copy of the protected wsdl file and let wsconsume consume that. Btw, that's what JBoss Wise ( http://www.jboss.org/wise http://www.jboss.org/wise) does, see classes at http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.2.Final/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/ http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.2.Final/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827791#827791]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...