Hi,
thanks for the fix!
No problem, that the second bug won't be fixed for 2.2. I just wanted to
report it.
I will open a JIRA item and include your message as the description, ok?
Thx,
Christian

Sonntag, 11. März 2007 16:54
To: [email protected]
cc:
From: Andrew Eberbach <[EMAIL PROTECTED]>
Subject: Re: wsdl2java error for wsn-consumer


Hi,

First, I fixed the rmd filename changing in the wsdl.

Second,  the problem is that we put in a check into the descriptor
generation code that checks to see if there are servicegroup entries in
the generated project. This code should be replaced by more service group
aware code generation, but since it's very late in 2.2, we'll have to push
that off to 2.3. The following process should be automated, but since it's
not you'll have to follow it by hand:

1. Generate using wsdl2java. I put in a fix that will let the muse.xml
generate from what you have now.
2. Edit the .overwrite file in the root of the root of the directory and
remove line that has muse.xml. This will prevent muse.xml from being
overwritten if you generate in the directory again.
3. Edit the generated muse.xml and add a resource-type element as follows:

<resource-type use-router-persistence="true"
xmlns:wsrf-sgw="http://docs.oasis-open.org/wsrf/sgw-2";>
    <context-path>service-group</context-path>
    <wsdl>
        <wsdl-file>/wsdl/WS-ServiceGroup-1_2.wsdl</wsdl-file>
        <wsdl-port-type>wsrf-sgw:ServiceGroupPortType</wsdl-port-type>
    </wsdl>

<java-id-factory-class>org.apache.muse.core.routing.CounterResourceIdFactory</java-id-factory-class>

<java-resource-class>org.apache.muse.ws.resource.impl.SimpleWsResource</java-resource-class>
<capability>

<capability-uri>http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</capability-uri>

<java-capability-class>org.apache.muse.ws.metadata.impl.SimpleMetadataExchange</java-capability-class>
</capability>
<capability>

<capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get</capability-uri>

<java-capability-class>org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability</java-capability-class>
</capability>
<capability>

<capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Query</capability-uri>

<java-capability-class>org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability</java-capability-class>
</capability>
<capability>

<capability-uri>http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroup</capability-uri>

<java-capability-class>org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup</java-capability-class>
</capability>
</resource-type>

Also, on the other resource-type element (that has the Entry capability in
it) take out the use-router-persistence="true" attribute.

4. Add the wsdl that's referenced here. You'll find it in the j2ee/wsrf
example. You'll need the wsdl, schema and rmd.

5. Create the router entries file for the service-group. So make a
router-entries/service-group directory under classes and put in a file
called:

resource-instance-1.xml

with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<wsa:ReferenceParameters
xmlns:wsa="http://www.w3.org/2005/08/addressing"/>

Then you can run ant to generate a war file.

The above process is automatable so if you'd like to see it in the next
muse release please open a JIRA item and it'll get done.

Thanks,
Andrew

Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]



Christian Ewers <[EMAIL PROTECTED]>
03/11/2007 04:41 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: wsdl2java error for wsn-consumer







Hi,

No there are no error messages, that's why I thought it works. I used the
following command:
wsdl2java.bat -j2ee axis2 -wsdl NotificationServiceGroupEntry.wsdl -output
../../../target/entry

As I can see, the tool generates everything but the muse.xml file and the
router-entries. The WEB-INF/classes directory has the following structure
after generation.

classes
- wsdl
  --ServiceGroupEntry.wsdl
  - commons-logging.properties
  - log4j.properties

The services.xml file is generated correctly.
I noticed another "problem" with a different wsdl-file, but I don't know
if
its intended. The wsdl2java-tool renames the rmd-file according to the
service name, but does not update the desciptor entry in the porttype
attribute of the new wsdl-file. Does the rmd-file-has to be the same as
the
service-name?

Thanks,
Christian


Samstag, 10. März 2007 21:51
To: [email protected]
cc:
From: Andrew Eberbach <[EMAIL PROTECTED]>
Subject: Re: wsdl2java error for wsn-consumer


Ok, so there are no error messages generated? What are the command line
arguments that you are using? Also, are you saying that the consumer
capability is not being added to your muse.xml or that no muse.xml is
generated?

Thanks,
Andrew

Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]



Christian Ewers <[EMAIL PROTECTED]>
03/10/2007 03:43 PM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: wsdl2java error for wsn-consumer







Hi,
sorry but I sent my latest mail too early...
The error message is gone, but the tool still doesn't generate the
muse.xml
and the router-entries.

Thanks,
Christian


Samstag, 10. März 2007 17:29
To: [email protected]
cc:
From: Andrew Eberbach <[EMAIL PROTECTED]>
Subject: Re: wsdl2java error for wsn-consumer


Hi,

This was a problem with the array parameter logic. The fix is checked in.

Thanks,
Andrew

Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]



Christian Ewers <[EMAIL PROTECTED]>
03/10/2007 11:11 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
wsdl2java error for wsn-consumer







Hi,
I want to add the wsn-comsumer apability to the WS-ServiceGroupEntry.wsdl.
Just adding the needed elements and edit the muse.xml works,  but I want
to
get the wsdl file "accepted" by the wsdl2java tool to stay compatible.

When I apply wsdl2java to the wsdl I get the following error:

#####

java.lang.NullPointerException
at
org.apache.muse.util.ReflectUtils.getArrayClassFromClass(ReflectUtils.java:131)
at
org.apache.muse.tools.inspector.ResourceInspector.getJavaType(ResourceInspector.java:509)
at
org.apache.muse.tools.inspector.ResourceInspector.createJavaMethod(ResourceInspector.java:374)
at
org.apache.muse.tools.inspector.ResourceInspector.getOperations(ResourceInspector.java:562)
at
org.apache.muse.tools.inspector.ResourceInspector.run(ResourceInspector.java:880)
at
org.apache.muse.tools.generator.analyzer.SimpleAnalyzer.inspect(SimpleAnalyzer.java:403)
at
org.apache.muse.tools.generator.analyzer.SimpleAnalyzer.analyze(SimpleAnalyzer.java:342)
at
org.apache.muse.tools.generator.Wsdl2Java.run(Wsdl2Java.java:173)
at
org.apache.muse.tools.generator.Wsdl2Java.main(Wsdl2Java.java:265)

SEVERE: [ID = 'CodeGenFailed'] Code generation failed, see the exception
information below.

An exception was caught: null

######

I added the following imports and elements to the wsdl-file

##definitions
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";

##import
<xsd:schema
     elementFormDefault="qualified"
     targetNamespace="http://docs.oasis-open.org/wsn/b-2";>
     <xsd:include schemaLocation="WS-BaseNotification-1_3.xsd" />
</xsd:schema>
##messages
<wsdl:message name="Notify">
      <wsdl:part name="Notify" element="wsnt:Notify"/>
      </wsdl:message>

##portType
<wsdl:operation name="Notify">
      <wsdl:input
      wsa:Action="

http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/NotifyRequest";

        message="tns:Notify"/>
        </wsdl:operation>


Any ideas what's wrong?
Thanks,
Christian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to