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

Bugfix/header values composing #381

Merged
merged 5 commits into from Jul 20, 2016

Conversation

@coutoPL
Copy link
Contributor

coutoPL commented Jul 20, 2016

Ref #366

Soap envelope should be:

<soap12:Envelope>
    <soap12:Header>
      <sessionId>session</sessionId>
      <correlationId>10001</correlationId>
    </soap12:Header>
    <soap12:Body>
      <username>User</username>
    </soap12:Body>
</soap12:Envelope>

not:

<soap12:Envelope>
    <soap12:Header>
      session10001
    </soap12:Header>
    <soap12:Body>
      User
    </soap12:Body>
</soap12:Envelope>

for tested WSDLs (implicit_header_example.wsdl, explicit_header_example.wsdl and implicit_header_multiple_part_header.wsdl)

@@ -38,14 +38,18 @@ object Wsdl11Soap12Test extends TestBase {
|val service = new implicitheader.UserBindings with scalaxb.SoapClients with scalaxb.HttpClients {
| override def httpClient = new HttpClient {
| override def request(in: String, address: java.net.URI, headers: Map[String, String]): String = {
| println("!!!" + in)

This comment has been minimized.

Copy link
@eed3si9n
.part.filter(_.name == Some(header.part))
.map(x => x.copy(name = x.name.map(camelCase)))
context.messages(splitTypeName(header.message)).part
.filter(_.name.contains(header.part))

This comment has been minimized.

Copy link
@eed3si9n

eed3si9n Jul 20, 2016

Owner

Does this change the behavior?

This comment has been minimized.

Copy link
@coutoPL

coutoPL Jul 20, 2016

Author Contributor

no ... IMO it's just cleaner

This comment has been minimized.

Copy link
@coutoPL

coutoPL Jul 20, 2016

Author Contributor

ok, but there is no contain in Option class of scala 2.10. Reverted.

@eed3si9n
Copy link
Owner

eed3si9n commented Jul 20, 2016

Thanks for following up with a quick fix!

@eed3si9n
Copy link
Owner

eed3si9n commented Jul 20, 2016

I don't know how Apache CXF encodes implicit headers, but if it's supported, it might be worth running the server and hitting it with scalaxb like here:

@coutoPL
Copy link
Contributor Author

coutoPL commented Jul 20, 2016

I've tried to force apache CXF to generate wsdl with implicit headers and unfortunately I couldn't. Google says nothing about using implicit headers by CXF, so I guess it's impossible to achieve.

@eed3si9n
Copy link
Owner

eed3si9n commented Jul 20, 2016

I'm going to restart Travis to see what happens. I think I've seen it fail like that before.

@eed3si9n eed3si9n merged commit 40a4249 into eed3si9n:master Jul 20, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@coutoPL coutoPL deleted the coutoPL:bugfix/header_values_composing branch Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.