Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1150093

Summary: SOAP port has a different name than the default getCommandServicePort method uses
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: etirelli, ibek, kverlaen
Target Milestone: ER5   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:34:03 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:
Embargoed:
Attachments:
Description Flags
CommandService.wsdl
none
CommandService.wsdl in BPMS 6.1.0.ER2 none

Description Ivo Bek 2014-10-07 12:19:21 UTC
Created attachment 944565 [details]
CommandService.wsdl

Description of problem:

org.kie.remote.services.ws.command.generated.CommandWebServiceClient has a method called getCommandServicePort(). This method returns port at (new QName("http://services.remote.kie.org/6.2.0.1/command", "CommandServicePort")). The problem with the operation is that the port is called differently as I read in the attached WSDL provided by Business Central. Instead of "CommandServicePort" it is called "CommandServiceClient".

The workaround is to use another method this way:

CommandWebService cws = client.getPort(new QName("http://services.remote.kie.org/6.2.0.1/command", "CommandServiceClient"), CommandWebService.class);

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Marco Rietveld 2014-10-08 05:35:37 UTC
Hi Ivo, 

Should I change "CommandServiceClient" to be "CommandServicePort"? It's not clear to me what a good solution to this problem would be. Any suggestions would be great, thanks!

Comment 2 Ivo Bek 2014-10-08 07:58:31 UTC
Hi Marco,

every option is good to me, whether you choose "CommandServiceClient" or "CommandServicePort" but both should be the same in the WSDL and in the generated client class. Perhaps "CommandServicePort" might be better, however that is just my opinion. Hence it should be enought to change this line of portName to "CommandServicePort":

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-remote/kie-remote-services/src/main/java/org/kie/remote/services/ws/command/CommandWebServiceImpl.java#L14

Thanks

Comment 3 Marco Rietveld 2014-12-01 17:18:56 UTC
Ivo, 

Could you take another look at this? All classes are generated based on the WSDL. I'm not sure how a generated class could be different than what's in the WSDL.

Comment 4 Marco Rietveld 2014-12-01 17:33:09 UTC
Also, could you attach the WSDL that you're seeing? Thanks!

Comment 5 Ivo Bek 2014-12-01 17:42:10 UTC
Created attachment 963384 [details]
CommandService.wsdl in BPMS 6.1.0.ER2

I have still the same problem in BPMS 6.1.0.ER2 when I use:

cws = client.getCommandServicePort();

org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for port {http://services.remote.kie.org/6.2.0.1/command}CommandServicePort.

This is the method causing the issue:

getCommandServicePort() {
        return super.getPort(new QName("http://services.remote.kie.org/6.2.0.1/command", "CommandServicePort"), CommandWebService.class);
    }

To make it working I have to change it to:

cws = client.getPort(new QName("http://services.remote.kie.org/6.2.0.1/command", "CommandServiceClient"), CommandWebService.class);

However, I noticed that in the same class there is a field with correct name:

private final static QName COMMANDSERVICECLIENT_QNAME = new QName("http://services.remote.kie.org/6.2.0.1/command", "CommandServiceClient");

I attached the WSDL that BPMS 6.1.0.ER2 provides at http://localhost:8080/business-central/ws/CommandService?wsdl

Comment 6 Marco Rietveld 2014-12-02 19:40:07 UTC
Ivo, this might be related to the dependencies in the test. 

Could you provide a git link to the reproducer, so I can see which dependencies are being used?

Comment 7 Marco Rietveld 2014-12-02 19:41:15 UTC
Also, kie-remote-services should never be used on the client side. The client side library for the command webservice is kie-remote-ws-wsdl-cmd and kie-remote-ws-common.

Comment 9 Marco Rietveld 2015-02-06 12:06:37 UTC
As a result of another bug (involving authentication and security), this has been fixed. 

I believe that this test tests the issue: 

https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.2.x/kie-remote/kie-remote-client/src/test/java/org/kie/remote/services/ws/command/CommandServiceTest.java

Comment 10 Ivo Bek 2015-02-17 16:23:59 UTC
Verified in BPMS 6.1.0.ER5