Petals BC SOAP

NPE getting a service WSDL

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 4.0.7
  • Fix Version/s: 4.0.8
  • Component/s: documentation
  • Security Level: Public
  • Description:
    Hide

    1 - Deploy a service consumer on BC SOAP
    2 - Get the WSDL of the service provider using your favorite navigator,
    --> You get the following error in the navigator: "There are no WebService available at this URI : /petals/services/XI01Service"
    with the following exceptions:

    [Petals.Container.Components.petals-bc-soap-4]-FINE 2011-10-13 11:25:46,979 Get and update the service definition
    [Petals.Container.Components.petals-bc-soap-4]-FINE 2011-10-13 11:25:46,979 JBI Service endpoint {http://xi01.snv2sxml.technical.services.esb.acoss.fr/1.0}XI01Service ->petals:uid:58320DD3F86C3492184615976800920141 (INTERNAL):subdomain1/0/se-routage-ancre-se-2
    [Petals.Container.Components.petals-bc-soap-4.jetty]-WARNING 2011-10-13 11:25:47,213 Nested in javax.servlet.ServletException: Error during streaming serialization:
    java.lang.NullPointerException
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.createExternalLocation(DescriptionImpl.java:533)
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.deleteImportedDocumentsInWsdl(DescriptionImpl.java:364)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.generateComplexWSDL(PetalsAxisService.java:197)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.printWSDL(PetalsAxisService.java:171)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.printImportedDocuments(SoapServlet.java:174)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doGet(SoapServlet.java:104)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:324)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    [Petals.Container.Components.petals-bc-soap-4.jetty]-WARNING 2011-10-13 11:25:47,213 /petals/services/XI01Service
    java.lang.NullPointerException
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.createExternalLocation(DescriptionImpl.java:533)
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.deleteImportedDocumentsInWsdl(DescriptionImpl.java:364)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.generateComplexWSDL(PetalsAxisService.java:197)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.printWSDL(PetalsAxisService.java:171)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.printImportedDocuments(SoapServlet.java:174)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doGet(SoapServlet.java:104)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:324)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    Show
    1 - Deploy a service consumer on BC SOAP 2 - Get the WSDL of the service provider using your favorite navigator, --> You get the following error in the navigator: "There are no WebService available at this URI : /petals/services/XI01Service" with the following exceptions:
    [Petals.Container.Components.petals-bc-soap-4]-FINE 2011-10-13 11:25:46,979 Get and update the service definition
    [Petals.Container.Components.petals-bc-soap-4]-FINE 2011-10-13 11:25:46,979 JBI Service endpoint {http://xi01.snv2sxml.technical.services.esb.acoss.fr/1.0}XI01Service ->petals:uid:58320DD3F86C3492184615976800920141 (INTERNAL):subdomain1/0/se-routage-ancre-se-2
    [Petals.Container.Components.petals-bc-soap-4.jetty]-WARNING 2011-10-13 11:25:47,213 Nested in javax.servlet.ServletException: Error during streaming serialization:
    java.lang.NullPointerException
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.createExternalLocation(DescriptionImpl.java:533)
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.deleteImportedDocumentsInWsdl(DescriptionImpl.java:364)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.generateComplexWSDL(PetalsAxisService.java:197)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.printWSDL(PetalsAxisService.java:171)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.printImportedDocuments(SoapServlet.java:174)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doGet(SoapServlet.java:104)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:324)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    [Petals.Container.Components.petals-bc-soap-4.jetty]-WARNING 2011-10-13 11:25:47,213 /petals/services/XI01Service
    java.lang.NullPointerException
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.createExternalLocation(DescriptionImpl.java:533)
            at org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.DescriptionImpl.deleteImportedDocumentsInWsdl(DescriptionImpl.java:364)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.generateComplexWSDL(PetalsAxisService.java:197)
            at org.ow2.petals.binding.soap.listener.incoming.PetalsAxisService.printWSDL(PetalsAxisService.java:171)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.printImportedDocuments(SoapServlet.java:174)
            at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doGet(SoapServlet.java:104)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:324)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
  • Environment:
    -
  1. PETALSBCSOAP-97.patch
    (2 kB)
    Christophe DENEUX
    Thu, 3 Nov 2011 - 11:17:07 +0100

Activity

Hide
Christophe DENEUX added a comment - Fri, 30 Oct 2015 - 09:40:37 +0100

I don't know what to do. This problem is the symptom of an incompatibility between components based on different CDK versions that are not compliant.

Since the introduction of the distribution "Petals Enterprise", all delivered components are based on the same CDK, so this problem can't occur any more. But is it sufficient ? We wrote any warning on the obligation to use components from the same distribution.

Show
Christophe DENEUX added a comment - Fri, 30 Oct 2015 - 09:40:37 +0100 I don't know what to do. This problem is the symptom of an incompatibility between components based on different CDK versions that are not compliant. Since the introduction of the distribution "Petals Enterprise", all delivered components are based on the same CDK, so this problem can't occur any more. But is it sufficient ? We wrote any warning on the obligation to use components from the same distribution.
Hide
Victor NOËL added a comment - Thu, 29 Oct 2015 - 17:56:23 +0100

Can we mark this as wont fix because we don't work with CDK4 anymore? or not?

Show
Victor NOËL added a comment - Thu, 29 Oct 2015 - 17:56:23 +0100 Can we mark this as wont fix because we don't work with CDK4 anymore? or not?
Hide
Christophe DENEUX added a comment - Thu, 3 Nov 2011 - 11:17:07 +0100

Add patch to apply on CDK 4 to have internal WSDL compliant with CDK 5

Show
Christophe DENEUX added a comment - Thu, 3 Nov 2011 - 11:17:07 +0100 Add patch to apply on CDK 4 to have internal WSDL compliant with CDK 5
Hide
Christophe DENEUX added a comment - Thu, 3 Nov 2011 - 11:15:36 +0100

A solution could be to inject imported ressources into the initial WSDL:

<wsdl:definitions targetNamespace="myWsdlNamespace" xmlns:pivot="http://myPivot/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:svc-api="http://mySvcApi/1.0">
  <wsdl:types>
    <xsd:schema targetNamespace="http://mySvcApi/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://myPivot/1.0" schemaLocation="datamodel_pivot.xsd"/>
      <xsd:element name="myRequest" type="svc-api:myRequestType"/>
    </xsd:schema>
  </wsdl:types>
</wsdl:definitions>

can be rewritten:

<wsdl:definitions targetNamespace="myWsdlNamespace" xmlns:pivot="http://myPivot/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:svc-api="http://mySvcApi/1.0">
  <wsdl:types>
    <xsd:schema targetNamespace="http://myPivot/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      ...
    </xsd:schema>
    <xsd:schema targetNamespace="http://mySvcApi/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="myRequest" type="svc-api:myRequestType"/>
    </xsd:schema>
  </wsdl:types>
</wsdl:definitions>
Show
Christophe DENEUX added a comment - Thu, 3 Nov 2011 - 11:15:36 +0100 A solution could be to inject imported ressources into the initial WSDL:
<wsdl:definitions targetNamespace="myWsdlNamespace" xmlns:pivot="http://myPivot/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:svc-api="http://mySvcApi/1.0">
  <wsdl:types>
    <xsd:schema targetNamespace="http://mySvcApi/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://myPivot/1.0" schemaLocation="datamodel_pivot.xsd"/>
      <xsd:element name="myRequest" type="svc-api:myRequestType"/>
    </xsd:schema>
  </wsdl:types>
</wsdl:definitions>
can be rewritten:
<wsdl:definitions targetNamespace="myWsdlNamespace" xmlns:pivot="http://myPivot/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:svc-api="http://mySvcApi/1.0">
  <wsdl:types>
    <xsd:schema targetNamespace="http://myPivot/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      ...
    </xsd:schema>
    <xsd:schema targetNamespace="http://mySvcApi/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="myRequest" type="svc-api:myRequestType"/>
    </xsd:schema>
  </wsdl:types>
</wsdl:definitions>
Hide
Christophe DENEUX added a comment - Tue, 18 Oct 2011 - 09:29:00 +0200

Reopen to merge the documentation

Show
Christophe DENEUX added a comment - Tue, 18 Oct 2011 - 09:29:00 +0200 Reopen to merge the documentation
Hide
Christophe DENEUX added a comment - Tue, 18 Oct 2011 - 09:27:57 +0200

This problem won't fix because:

  • the fix is located into the CDK 4 about managing WSDL
  • a component based on the fixed CDK will be not compliant with component based on an older CDK 4

As it is not possible to fix the problem to be compliant CDK 4 (all versions) and CDK 5, it has been decided on:

  • to force to move the service provider on a component based on CDK 5
  • to reference this problem into the BC SOAP documentation
Show
Christophe DENEUX added a comment - Tue, 18 Oct 2011 - 09:27:57 +0200 This problem won't fix because:
  • the fix is located into the CDK 4 about managing WSDL
  • a component based on the fixed CDK will be not compliant with component based on an older CDK 4
As it is not possible to fix the problem to be compliant CDK 4 (all versions) and CDK 5, it has been decided on:
  • to force to move the service provider on a component based on CDK 5
  • to reference this problem into the BC SOAP documentation
Hide
Christophe DENEUX added a comment - Thu, 13 Oct 2011 - 11:44:41 +0200 - edited

The problem occurs if the service provider is running on a JBI component based on CDK 4, and the service consumer is deployed on a JBI component based on CDK 5.

If we add a NPE check in EasyWSDL Complex extension, the returned WSDL is not correct because the complex WSDLs managed by CDK 4 or CDK 5 use the tag

{http://petals.ow2.org/wsdlExtensions}importedDocuments/{http://petals.ow2.org/wsdlExtensions}document
with attribute name to store imported resources by the WSDL. And the CDK 5 updates import locations with an XPath expression as
xpath://description/importedDocuments/document/ServiceFaults.xsd
, and, on tag document, uses attributes location and originalLocation whereas the CDK 4 does not update them and uses attribute name.

Show
Christophe DENEUX added a comment - Thu, 13 Oct 2011 - 11:44:41 +0200 - edited The problem occurs if the service provider is running on a JBI component based on CDK 4, and the service consumer is deployed on a JBI component based on CDK 5. If we add a NPE check in EasyWSDL Complex extension, the returned WSDL is not correct because the complex WSDLs managed by CDK 4 or CDK 5 use the tag
{http://petals.ow2.org/wsdlExtensions}importedDocuments/{http://petals.ow2.org/wsdlExtensions}document
with attribute name to store imported resources by the WSDL. And the CDK 5 updates import locations with an XPath expression as
xpath://description/importedDocuments/document/ServiceFaults.xsd
, and, on tag document, uses attributes location and originalLocation whereas the CDK 4 does not update them and uses attribute name.

People

Dates

  • Created:
    Thu, 13 Oct 2011 - 11:26:43 +0200
    Updated:
    Fri, 30 Oct 2015 - 09:40:38 +0100