Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 174326 - [68cat] Problems with Http binding
[68cat] Problems with Http binding
Status: NEW
Product: webservices
Classification: Unclassified
Component: Code
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: Milan Kuchtiak
issues@webservices
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-12 08:29 UTC by Peter Nabbefeld
Modified: 2013-07-24 08:08 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nabbefeld 2009-10-12 08:29:55 UTC
[ JDK VERSION : 1.6.* ]

I've created a new concrete WSDL (IntegerAdder) file with Http (GET
with urlEncoded encoding) binding selected, otherwise only renaming
parameters and adding one additional for input as well as aligning
types (i.e. in/out as integers).

When I try to generate a Web Service (JAX-WS) from it, I'm getting
the following output:

[WARNING] port "newWSDLPort" is not a SOAP port, it has no
soap:address 
  line 36 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

[WARNING] port "newWSDLPort": not a standard SOAP port. The generated
artifacts may not work with JAXWS runtime. 
  line 36 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

[WARNING] fault "fault1" in operation "newWSDLOperation" does not
have a SOAP fault extension
  line 32 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

[WARNING] fault "fault1" in operation "newWSDLOperation" does not
have a SOAP fault extension
  line 32 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

[WARNING] soap:fault name not specified, wsdl:fault "fault1" in
operation "newWSDLOperation"
  line 32 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

[ERROR] in message "newWSDLOperationFault", part "part1" must specify
a "element" attribute
  line 15 of
file:/C:/Dokumente%20und%20Einstellungen/pna/Eigene%20Dateien/NetBeans
Projects/IntegerAdder/xml-resources/web-service-references/newWSDL/wsd
l/newWSDL.wsdl

Probably Http binding only supported for JAX-RPC? I've tried and got:

Copying 1 file to C:\Dokumente und Einstellungen\pna\Eigene
Dateien\NetBeansProjects\IntegerAdder\build\generated-sources\jax-rpc\
wsdl
Warnung: Anschluss "newWSDLPort" wird ignoriert: Keine SOAP-Adresse
angegeben
Warnung: Dienst "newWSDLService" enthält keine verwendbaren
Anschlüsse

(WARNING: "newWSDLPort" ignored, no SOAP address
 WARNING: service "newWSDLService" doesn't contain any usable ports)

Why do I need a SOAP address for Http binding?

1. If Http bindings aren't supported, there should be an appropriate
message: A warning at WSDL creation, that the plugin doesn't support
WS creation from the resulting file, and an error message saying that
this type of binding isn't supported at WS creation time in the
output window - other errors should be suppressed, in this case.

2. In the case of JAX-RPC, it looks like the module could use Http
binding, but probably isn't correctly initialized.

3. There should be configurable samples (do You remember the Java
class dialog in NB 3.x? It's been too large for this simple task and
thus has been removed, but sth. similar could be helpful for WSDL -
at least creating a valid file with correct bindings and params -
probably just a simple IntegerAdder ;) )
Comment 1 Milan Kuchtiak 2009-11-20 01:57:53 UTC
Thanks for pointing to this.
Moreover, we incorrectly generate client for HTTP GET/POST soap binding.
We should, at least, somehow inform the user that Netbeans doesn't support this binding.

>Why do I need a SOAP address for Http binding?

I think each wsdl:binding element requires specific wsdl:port element, though they could be mapped to the same endpoint. See example:

  <wsdl:service name="CurrencyConvertor">
    <wsdl:port name="CurrencyConvertorSoap" binding="tns:CurrencyConvertorSoap">
      <soap:address location="http://www.webservicex.net/CurrencyConvertor.asmx" />
    </wsdl:port>
    <wsdl:port name="CurrencyConvertorSoap12" binding="tns:CurrencyConvertorSoap12">
      <soap12:address location="http://www.webservicex.net/CurrencyConvertor.asmx" />
    </wsdl:port>
    <wsdl:port name="CurrencyConvertorHttpGet" binding="tns:CurrencyConvertorHttpGet">
      <http:address location="http://www.webservicex.net/CurrencyConvertor.asmx" />
    </wsdl:port>
    <wsdl:port name="CurrencyConvertorHttpPost" binding="tns:CurrencyConvertorHttpPost">
      <http:address location="http://www.webservicex.net/CurrencyConvertor.asmx" />
    </wsdl:port>
  </wsdl:service>

Suggested solution :

use Jersey(REST) Client API to generate client for HTTP GET/POST bindings.
Using this API it should be pretty straightforward. See:
http://blogs.sun.com/enterprisetechtips/entry/consuming_restful_web_services_with

This is pretty complex, so am qualifying this as new feature (enhancement).
Comment 2 Denis Anisimov 2010-09-22 10:32:23 UTC
Setting this to enhancement due last comment of Milan.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo