source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Examples/WSDLClientFileIssue_OldESB/Readme.txt@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 8.6 KB
Line 
1These three composite applications illustrate two separate issues we are
2having.
3
4Please note that these example projects must be placed in the following directory
5for these examples to work:
6
7C:\projects\NHINC\Current\Product\Production\Examples\WSDLClientFileIssue_OldESB
8
9
10
11Issue 1: Calling web service must be done in Thread
12--------------------------------------------------
13First, we have an issue where when we have an EJB Bean which calls a web service
14from within the java code, the call will fail unless it is wrapped in a thread.
15
16Issue 2: Hard coded path to WSDL
17---------------------------------
18Second, when we expose a web service in the NMR that is an EJB web service, and
19where that EJB web service makes a Java based call to another web service, it
20keeps a hard coded path to the WSDL that was used to create the client proxy
21code, and when you deploy the composite application, it tries to find (at runtime)
22the WSDL in the physical location on the machine it was compiled on, rather
23than looking within the deployed location for the WSDL.
24
25Issue 3: Hand modification of jaxws-build.xml to get Schemas
26-------------------------------------------------------------
27There is a secondary question that we have.... Whenever we create an EJB web service
28that we wrap with a composite application, in the EJB project, we have to add in
29code to copy the XML Schemas to their appropriate location. if we do not put that
30in, the EJB will not deploy.... This one we know how to work around, but we would
31like to know why NetBeans is not taking care of this.
32
33NOTE: When running these projects, they call a UDDI web service. This web service
34is exposed to the internet, so you should be able to run the tests directly....
35
36List of Projects:
37
38Issue 1: SampleService1EJB & SampleService1CA (Illistrates
39------------------------------------
40This illustrates the issue when trying to access a web service through an EJB
41and where the call to the web service is NOT done in a thread. To run this test
42you should compile and deploy SampleService1CA. Run TestCase1. It will
43say passed, but this may not be true. The only way to tell whether this passed
44is to look at the glassfish output log. When it fails, you see the following error:
45
46HTTPBC-E00759: An exception occured while processing a reply message. The server sent HTTP status code -1: null
47com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null
48 at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:203)
49 at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:177)
50 at com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:118)
51 at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
52 at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
53 at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
54 at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
55 at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
56 at com.sun.xml.ws.client.Stub.process(Stub.java:222)
57 at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:180)
58 at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:206)
59 at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.outboundCall(OutboundMessageProcessor.java:986)
60 at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.dispatch(OutboundMessageProcessor.java:1017)
61 at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.processRequestReplyOutbound(OutboundMessageProcessor.java:661)
62 at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.processMessage(OutboundMessageProcessor.java:243)
63 at com.sun.jbi.httpsoapbc.OutboundAction.run(OutboundAction.java:63)
64 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
65 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
66 at java.lang.Thread.run(Thread.java:619)
67
68You can see the full output in: Output_SampleService1.txt. Please note that we have also seen a different error message
69when running without a thread. I cannot recall the text of that message, it was in a different project, but pushing the
70call to a thread resolved it.... I do notice the strange binary data in the trace messages - it makes me wonder if
71what is happening by the HTTP binding component is that it is confusing the response of the encapsualted web service with
72the outer one.
73
74Issue 1: SampleService2EJB & SampleService2CA
75----------------------------------------------
76Before running this test, you must undeploy sample 1 above....
77This project is identical to the previous one, except in this case a thread is created so that the
78call to the web service from Java is done in an encapsulated thread. This one works. You can see
79the output of this example in Output_SampleService2.txt.
80
81Issue 2: SampleService2EJB & SampleService2CA
82----------------------------------------------
83This one uses the same project as the previous test to illustrate issue 2. To run this test, with
84the SampleService2CA deployed, rename your WSDLInterfaces directory to some other name (i.e. WSDLInterfaces_renamed).
85Now re-run the test. Since it can no longer find the WSDL in the "compiled" location, it will fail.
86You can find the output of this one in Output_SampleService2_FailedLocation.txt.
87
88You will notice here that the errors are that it cannot find the WSDL in the specified location. It
89is not looking in the deployed application area, but rather in the location where the file existed at
90compile time.
91
92Issue 2: SampleService3EJB & SampleService3CA
93---------------------------------------------
94Before running this test, you must undeploy sample 2 above....
95In searching the web regarding this problem, we found several pages that described this as a known problem
96with a work around. It defined the problem to be that the jaxws-build.xml file contained the following target:
97
98 <target name="wsimport-client-uddi_v3_service" depends="wsimport-init,wsimport-client-check-uddi_v3_service" unless="wsimport-client-uddi_v3_service.notRequired">
99 <wsimport xendorsed="true" sourcedestdir="${build.generated.dir}/wsimport/client" extension="true" destdir="${build.generated.dir}/wsimport/binaries" wsdl="${basedir}/${meta.inf}/xml-resources/web-service-references/uddi_v3_service/wsdl/uddi_v3_service.wsdl" wsdlLocation="file:/C:/projects/nhinc/Current/Product/Production/Tutorials/WSDLClientFileIssue/WSDLInterfaces/src/wsdl/uddi_v3_service.wsdl" catalog="catalog.xml"/>
100 <copy todir="${classes.dir}">
101 <fileset dir="${build.generated.dir}/wsimport/binaries" includes="**/*.xml"/>
102 </copy>
103 </target>
104
105It stated that the problem is that it generates with an attribute in the wsimport called "wsdlLocation". This
106is treated as a hard path... The recommendation on the web sites was to remove the wsdlLocation attribute
107and that it would then fall back to using the "wsdl" attribute instead and that it will now be relative to the
108deployed composite application. However, we found that this is not the case. To illustrate this, we copied the
109target from the jaxws-build.xml file to the build.xml file (standard way of overriding targets). We then removed
110the wsldLocation attribute. We saw a change in behavior, but it was not sufficient... It just changed the physical
111path that was hard coded. Now rather than looking in
112C:\projects\nhinc\Current\Product\Production\Tutorials\WSDLClientFileIssue\WSDLInterfaces\src\wsdl\uddi_v3_service.wsdl,
113it now looks in:
114C:\projects\nhinc\Current\Product\Production\Tutorials\WSDLClientFileIssue\SampleService3EJB\src\conf\xml-resources\web-service-references\uddi_v3_service\wsdl\uddi_v3_service.wsdl
115
116I have tried many different options to try to get this to use a relative path to no avail... When I look at the generated code, it
117still tries to find the wsdl in this physical path.
118
119To reproduce this one, you deploy the composite application, then after it is deployed, you rename the directory where
120it is looking for the wsdl (similar to the previous test). Rename the SampleService3EJB\src\conf\xml-resources\web-service-references to
121some other name... and then run the test... Note that You could also deploy it in a glassfish environment that
122does not have the development projets available at all... (Different machine altogether...).
123
124An example of the output is found in Output_SampleService3.txt
125
126
127
Note: See TracBrowser for help on using the repository browser.