You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Paulo Renato de Athaydes <re...@hotmail.com> on 2014/12/07 16:13:08 UTC
IPojo D-OSGi arg names not using @WebParam annotation
Hi,
I am trying to use IPojo and D-OSGi to create a distributed OSGi environment to run some services.
I make OSGi services become remote services using the approach shown in the D-OSGi IPojo tutorial (declaring Apache Cxf properties in the metadata.xml file) and things work well, mostly:
http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/apache-felix-ipojo-dosgi.html
Snippet from my metadata.xml file:
<instance component="ipojo.example.code.server.ServerCodeRunner">
<property name="service.exported.interfaces" value="*"/>
<property name="service.exported.configs" value="org.apache.cxf.ws"/>
<property name="org.apache.cxf.ws.address" value="http://localhost:8080/coderunner"/>
</instance>
However, a problem that I haven't been able to solve so far is that IPojo does not seem to use the value I give for parameter names using @WebParameter, as Apache Cfx FAQ suggests:
https://cxf.apache.org/faq.html#FAQ-JAX-WSRelated
So, I end up with a WSDL containing arguments named arg0, arg1 etc. Example:
<xsd:complexType name="runScript">
<xsd:sequence>
<xsd:element minOccurs="0" name="arg0" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg1" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
For a method declared as:
@Override
public String runScript(
@WebParam(name = "language") String language,
@WebParam(name = "script") String script)
throws LanguageNotAvailableException, RemoteException {
And while we're at it, is there a way to change nillable to false and minOccurs to 1 using IPojo's metadata.xml file?
If you need more info, you can find the whole project on GitHub:
https://github.com/renatoathaydes/osgi-run/tree/next/osgi-run-test/ipojo-dosgi
(the sub-project which should expose OSGi remote services is called code-runner-server)
Regards,
Renato Athaydes