Bug 779546 (SOA-1922)

Summary: Unable to retreive services using jUDDI client with JAXWSTransport.
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Marek Baluch <mbaluch>
Component: jUDDI - within SOAAssignee: Kevin Conner <kevin.conner>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.0.0 ER8Keywords: TestBlocker
Target Milestone: ---   
Target Release: 5.0.0 CR1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1922
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-08 15:34:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
juddi-quickstart.zip
none
juddiv3.war none

Description Marek Baluch 2010-02-04 13:55:38 UTC
Date of First Response: 2010-02-04 09:51:39
project_key: SOA

If we try to retrieve any service with the jUDDI client via JAXWSTransport we get the following Exception:

    Cannot obtain wsdl service: {urn:uddi-org:v3_service}UDDI_Security_Port we have [{urn:uddi-org:v3_service}UDDI_Service]
    org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaDataInternal(JAXWSClientMetaDataBuilder.java:137)
    at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
    at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:137)
    at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
    at javax.xml.ws.Service.<init>(Service.java:79)
    at javax.xml.ws.Service.create(Service.java:96)
    at org.jboss.soa.esb.qa.tests.failover.soa5.juddiv3.tmp.SubscriptionTest.testServiceRetrievalOriginal(SubscriptionTest.java:82)
    23 lines not shown.

This is most probably caused due to the content of the published WSDL documents. 

HOW-TO REPRODUCE:
---------------------------------
POSSIBILITY A:
1) use attached quickstart

POSSIBILITY B:
1) configure a cluster with 2 intances.
2) add a node to client config on instance 1 which points to instance 2. Use JAXWSTransport
3) repeat step 2) on instance 2 - node must point to instance 1
5) add clerks to juddi client config on instance 1 and instace 2.
6) run both instances and check subscriptions in juddi console.

WORKAROUND
-----------------------
The services in question may be obtained like this:

    QName portName = new QName("urn:uddi-org:v3_service", "UDDI_Security_Port");
		
    // This is used by jUDDI client
    //QName qName = new QName("urn:uddi-org:v3_service", "UDDI_Sercurity_Port");

    QName serviceName = new QName("urn:uddi-org:v3_service", "UDDI_Service");
    Service service = Service.create(new URL("http://127.0.0.1:8080/juddiv3/services/subscription?wsdl"), serviceName);
    UDDISecurityPortType securityService = (UDDISecurityPortType) service.getPort(portName, UDDISecurityPortType.class);

Comment 1 Marek Baluch 2010-02-04 13:55:55 UTC
Attachment: Added: juddi-quickstart.zip


Comment 2 Kevin Conner 2010-02-04 14:51:39 UTC
The wsdl defines everything as a port within the UDDI_Service

Comment 3 Marek Baluch 2010-02-04 15:01:35 UTC
Well one thing. I went over all the getUDDI***Service() methods and getSecurityService throws 

Fatal Error] :-1:-1: Premature end of file.
   [testng] org.apache.juddi.v3.client.transport.TransportException: javax.wsdl.WSDLException: WSDLException (at /definitions/import[1]): faultCode=PARSER_ERROR: Problem parsing 'http://127.0.0.1:8080/juddiv3/services/security?wsdl&resource=uddi_vs_v3_binding.wsdl'.: org.xml.sax.SAXParseException: Premature end of file.

I'm not sure why though. The WSDL looks fine.

Comment 5 Kevin Conner 2010-02-05 12:12:16 UTC
Link: Added: This issue depends JBESB-3174


Comment 6 Kevin Conner 2010-02-05 14:44:09 UTC
Attachment: Added: juddiv3.war


Comment 7 Kevin Conner 2010-02-05 20:55:17 UTC
Attachment: Removed: juddiv3.war 


Comment 8 Kevin Conner 2010-02-05 20:57:14 UTC
Attachment: Added: juddiv3.war


Comment 9 Kevin Conner 2010-02-06 06:13:06 UTC
Attachment: Removed: juddiv3.war 


Comment 10 Kevin Conner 2010-02-06 06:13:42 UTC
Attachment: Added: juddiv3.war


Comment 11 Kevin Conner 2010-02-06 08:29:43 UTC
Attachment: Removed: juddiv3.war 


Comment 12 Kevin Conner 2010-02-06 08:33:03 UTC
Has to rejig all the WSDL to get the juddi uddi-tck tests to read, the shipped wsdl does not appear to be correct.

The only failing test seems to be the following

Running org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationTest
Going to read from file: /home/kevin/juddi/juddiv3/uddi-tck/temp/uddiclient.log
java.io.FileNotFoundException: /home/kevin/juddi/juddiv3/uddi-tck/temp/uddiclient.log (No such file or directory)

but this appears to be an issue with a drop file not existing rather than the WS part of the test.

Not sure if this is a test issue or an indication of other problems.

Comment 13 Kevin Conner 2010-02-06 08:33:03 UTC
Attachment: Added: juddiv3.war


Comment 14 Kevin Conner 2010-02-06 10:22:25 UTC
Updated in ESB codebase, will be in next merge.

Comment 15 Marek Baluch 2010-02-08 15:34:35 UTC
Verified on CR1.

Comment 17 Jiri Sedlacek 2010-10-14 12:42:07 UTC
Link: Added: This issue related SOA-2425