• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A wrapped parameter style become a bare style

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have this example of doc/lit/wrapped:


The WSDL schema is this. Obviously, it is a wrapped parameter style.
<xs:element name="increaseReq" type="tns:increaseReq"/>
<xs:element name="increaseResp" type="tns:increaseResp"/>
<xs:element name="sayHello" type="tns:sayHello"/>
<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
<xs:complexType name="increaseReq"><xs:sequence>
<xs:element name="arg0" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="increaseResp">
<xs:sequence><xs:element name="return" type="xs:int"/>
</xs:sequence>
</xs:complexType>
....

But the wsimport generates an SEI but the increment method becomes a BARE.


Why the generated SEI shows a BARA parameter style for the increase (increment) method ?
 
Greenhorn
Posts: 4
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFAIK, the request type name must be == method name (and must be exactly one!) in WRAPPED. Otherweise it is BARE (there are many other semanthic differences, but optically it is first what you see).
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
But obviously, in the SEI, I define increment method as Wrapped. But the generated SEI is Bare. That is something I don't understand.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post your SEI, SIB and generated WSDL in full (not snippets) and let us take a look. You can link to your GitHub or any other online repo if the code is large and you don't want to post them inline.
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could not figure out how to share files on GitHub with my free account yet.
Here is the web service :






Here is the generated SEI from wsimport -keep -verbose -p client http://localhost:8080/expImp?wsdl

From the above HelloWS.java, I notice the increase method has a parameter style which is Bare.
But the original SBI uses the default parameter style which is DOCUMENT.
 
a sarkar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where's the WSDL? FYI, all you need to do to share a Gist on GitHub is login, and go to this link: https://gist.github.com/
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I posted my WSDL and schema at:
https://gist.github.com/HimaiMinh/7724512
 
a sarkar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See the attached snippet. If the 3 items in red rectangles do not match exactly, JAX-WS will use BARE. In your case, they don't. Rename your RequestWrapper and you should see it using WRAPPED.
gist.jpg
[Thumbnail for gist.jpg]
WSDL
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried it and I change the localName of the RequestWrapper into increase.


Now, the generated SEI is in Wrapped style.
But why wsimport generates a Bare style when the names do not match (the operationName is increase while the request is increaseReq )?
 
a sarkar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Himai Minh wrote:why wsimport generates a Bare style when the names do not match (the operationName is increase while the request is increaseReq )?


I can't answer that, they didn't ask me when they wrote the spec. I just know that's how it works.
 
a sarkar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On a separate note, I think you're making a mistake with the SEI. Just having the SIB implement an interface does NOT make it an SEI; you need to specify the 'endpointInterface' explicitly. Otherwise, JAX-WS will generate an implicit SEI and ignore yours.
The above error is evident from the fact that you used a name="HelloToSomeoneService" on what you thought is your SEI but that name doesn't appear as the portType in your WSDL. Instead, the default (SIB simple name) is used.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic