Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set headers instead of random words? #39

Open
bluish5 opened this issue Jul 29, 2015 · 2 comments
Open

How to set headers instead of random words? #39

bluish5 opened this issue Jul 29, 2015 · 2 comments

Comments

@bluish5
Copy link

bluish5 commented Jul 29, 2015

Hello,
I like very much this project, the Java world needs it.
I have a SOAP web service that requires user credentials in the SOAP header, in this form:

<soapenv:Header>
    <AuthHeader>
        <Username>bubi</Username>
        <Password>secretword</Password>
    </AuthHeader>
</soapenv:Header>

How can I insert this XML tags in my requests, using soap-ws?
If I don't specify them, soap-ws builds the SOAP header like this:

<soapenv:Header>
    <ws:AuthHeader>
        <ws:Username>cum murmure</ws:Username>
        <ws:Password>aeoliam venit</ws:Password>
    </ws:AuthHeader>
</soapenv:Header>

I don't know why, but it seems it fills the credentials with random words taken from org.reficio.ws.legacy.SampleXmlUtil.WORDS. Why?

These are my Maven dependencies:

 <dependency>
     <groupId>org.reficio</groupId>
     <artifactId>soap-builder</artifactId>
     <version>1.0.0-SNAPSHOT</version>
 </dependency>
 <dependency>
     <groupId>org.reficio</groupId>
     <artifactId>soap-client</artifactId>
     <version>1.0.0-SNAPSHOT</version>
 </dependency>

Thank you for your help

@cfalzone
Copy link

This is just the way it works currently. You have to generate the response then use something like dom to replace the values. See: #24 and #14

@bluish5
Copy link
Author

bluish5 commented Jul 29, 2015

Thanks, have you planned to implement it in a near future? Just to know if it's better to wait for it or use the workaround you wrote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants