Hi,

Yea, i think we should take this seriously now, i would like to collect the requirement here, if this is most of our users want,
We must create jira issues asap.

Recently a co-worker of mine called me, asked the same thing, he has bunch of idl, and converted to wsdl, and he used the cxf tools, which generated bunch of doc-lit-wrapped style java code, but this is not what he want, he want bare style. So, at that time, the only thing i suggest he to do is to break one of the jaxws wrapped checking rules. in this way to generate bare style. After that i'm also thinking of adding an wrapped/bare option to cxfwsdl2java tools.

So, here we two issues raised,

* wsdl2java support soap header in a different message
* wsdl2java support wrapped/bare option

if there is no object, we can create a formal requirement through jira[1]

[1] https://issues.apache.org/jira/browse/CXF


Thanks,
James.




To bring up a point from a couple of weeks ago:

I agree with Matthew-- CXF should support SOAP headers that are defined
in their own message (rather than having to make the header a part in
the operation's request message).  This is much more concise and is
often seen in the real world.  This is the way that the salesforce.com
enterprise WSDL is defined, as well as the eBay WSDL.

Is this something that CXF could easily support?

-Chris

-----Original Message-----
From: Matthew Good [mailto:[EMAIL PROTECTED] Sent: Thursday, April 05, 2007 3:11 PM
To: [email protected]
Subject: RE: How To Get Object From SOAP Header?

WS-I 2208 is a "MAY" clause.  So using separate
messages is WS-I compliant.  (You scared me for a
second).
The wrapped vs. bare is not explicitly set in the
wsdl.  Sure it is somewhat specified based on those
rules in jax-ws but a source generation tool should
have an option to override that as best it can.
As far as interoperability, WS-I is the only thing
that we should have to abide by (jax-ws - Java!).  In
.NET there is a switch for wrapped vs. bare and I have
found nothing that matters from an interoperability
standpoint which way the switch is set.  The resulting
SOAP message is the same.

So, doc/literal yes, use it.  My opinion is that
jax-ws trying to determine wrapped vs. bare based on a
bunch of rules is absurd.  It's really a developer
preference.  (I am talking wsdl first development
here).


--- Christopher Moesel <[EMAIL PROTECTED]>
wrote:

Yes, this is in fact what I had been doing... but
when you define the
header as a separate message, CXF doesn't pass the
header object in as a
parameter.  So then, I'm not sure how to get access
to it...

Also, Gary Tully pointed out some recommendations in
the WS-I Basic
Profile that seem to suggest that the header should
be a part in the
same message as the body.  But the wording is
slightly ambiguous.

I've started rewriting my implementation in the BARE
style and I'm
actually finding that I also might prefer it.  My
only hesitation is
that it is my understanding that doc/literal wrapped
is best for
interoperability (but I can't recall where I picked
that up).

-Chris

-----Original Message-----
From: Matthew Good [mailto:[EMAIL PROTECTED] Sent: Thursday, April 05, 2007 1:20 PM
To: [email protected]
Subject: RE: How To Get Object From SOAP Header?

Not sure if this will help, but you can define the
header as a separate message so that you message
definitions still only have one part.  (Don't take
everything in this example literally as I like bare
;).


<message name="Identifier">
    <part name="Identifier" element="wse:Identifier"
/>
  </message>
  <message name="GetStatusMsg">
    <part name="body" element="wse:GetStatus" />
  </message>
...
  <portType name="Manager">
    <operation name="GetStatus">
      <input message="tns:GetStatusMsg" />
      <output message="tns:GetStatusResponseMsg" />
    </operation>
...
  <binding name="SubManagerBinding"
type="tns:SubscriptionManager">
    <soap:binding style="document"

transport="http://schemas.xmlsoap.org/soap/http";></soap:binding>
    <operation name="GetStatus">
      <soap:operation

soapAction="http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus";></
soap:operation>
      <input>
        <soap:header message="tns:Identifier"
part="Identifier" use="literal"/>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>
...


--- Christopher Moesel <[EMAIL PROTECTED]>
wrote:

So... if the header must be defined as a part in
the
message, then it is
impossible to use SOAP headers in a CXF
doc/literal
wrapped service?

Section 2.3.1.2 of the JAX-WS spec states that an
operation is only
considered to be wrapper style if the input and
output messages each
only have a *single* part.

It appears that CXF honors the spec:  after
changing
my WSDL to specify
the header as a part in each message, CXF now
generates the service
interface in the BARE style.

Ugh.  What to do?

-Chris

-----Original Message-----
From: Tully, Gary [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 6:13 PM
To: [email protected]
Subject: RE: How To Get Object From SOAP Header?

Hi Chris,

From my reading of the basic profile I think the
only the sample wsdl is
correct. Check out these relevant bits[1][2] for some more detail.
Hope this helps,
Gary.

[1]

http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#R2208
[2]

http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#R2738
-----Original Message-----
From: Christopher Moesel
[mailto:[EMAIL PROTECTED]
Sent: 04 April 2007 22:54
To: [email protected]
Subject: RE: How To Get Object From SOAP Header?

Ugh.  I apologize for the weird way my email
client formatted
those xml fragments.  I've tried to fix them
below-- let's
see if it works!

-----Original Message-----
From: Christopher Moesel
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 04, 2007 5:51 PM
To: [email protected]
Subject: RE: How To Get Object From SOAP Header?

Actually, after looking at some of the CXF
samples, I see
that CXF is expecting the WSDL to be a bit
different than how
I have done it.

CXF expects the header to be defined as a part
in
the request
message, as well as to be specified in the
wsdl:binding. For example:
<wsdl:message name="MyOperationRequest">
  <wsdl:part name="credentials"
element="types:UserCredentials"/>
  <wsdl:part name="body"
element="types:MyOperation"/> </wsdl:message>
...

<wsdl:operation name="MyOperation">
  <soap:operation soapAction=""/>
  <wsdl:input>
    <soap:header
message="tns:MyOperationRequest"
part="credentials"
use="literal" />
    <soap:body parts="body" use="literal"/>
  </wsdl:input>

  ...

</wsdl:operation>

My current WSDL defines a separate message type
for the
header rather than adding it as a part in the
request
message.  It references this header in the
wsdl:binding.
This worked in XFire:

<wsdl:message name="UserCredentials">
<wsdl:part name="credentials" element="types:UserCredentials"/>
</wsdl:message>
<wsdl:message name="MyOperationRequest">
  <wsdl:part name="body"
element="types:MyOperation"/> </wsdl:message>
...

<wsdl:operation name="MyOperation">
  <soap:operation soapAction=""/>
  <wsdl:input>
    <soap:header message="tns:UserCredentials"
part="credentials"
use="literal" />
    <soap:body use="literal"/>
  </wsdl:input>

  ...

</wsdl:operation>

Is my WSDL in bad form?  Or is this something
CXF
should be
able to handle?  I prefer my current method as
it
is a little
less verbose when re-using the header over
several
operations.
        
Thanks,
Chris

-----Original Message-----
From: Christopher Moesel
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 04, 2007 5:32 PM
To: [email protected]
Subject: How To Get Object From SOAP Header?

I have a custom authentication type that clients
send me
through the SOAP header.  In XFire, it generated
the service
interface with the header message sent in as a
parameter.
CXF does not do that.

How can I get access to that data from within my
service
implementation?

Thanks,
Chris

Matthew Good
[EMAIL PROTECTED]
720-320-8376



Matthew Good
[EMAIL PROTECTED]
720-320-8376


Reply via email to