[JBossWS] - Wrong minOccurs in wsdl generated by Jboss
by Gitu
I hope this is the righht forum
Am using JBOSS 4.3.0 with WebService. WSDL is autogenerated by JBOSS.
Issue in wsdl is with minOccurs in WSDL. Even method arguments are optional(minOcuurs="0")
For E. G My Method Signature is "getJobByName(String aJobName)" , generated wsdl has aJobName optional.
For some other methods its mandatory , which I dont understand how as there is hardly any difference .
| <xs:complexType name="getJobByName">
| <xs:sequence>
| <xs:element minOccurs="0" name="aJobName" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
|
|
Also , for some complex type (model object) , some fields are optional , others mandatory like Model (JobBean) which has name , type , version
Here Name and type will be generated as optional and version as mandatory. How can I fix it ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192801#4192801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192801
16 years, 3 months
[JBossWS] - Cannot obtain java type mapping
by bartatamas
Hi!
I'm trying to create a web service from a session bean:
package foo.ejb;
import java.util.logging.Logger;
/**
* @ejb.bean name="MerchTermWS"
* jndi-name="MerchTermWS"
* type="Stateless"
* view-type="service-endpoint"
*/
public class MerchTermWSBean implements SessionBean {
public void ejbActivate() throws EJBException {}
public void ejbPassivate() throws EJBException {}
public void ejbRemove() throws EJBException {}
public void setSessionContext(SessionContext arg0) throws EJBException {}
/**
* @ejb.create-method
*/
public void ejbCreate() throws javax.ejb.CreateException {}
/**
* @ejb.interface-method view-type = "service-endpoint"
*/
public void receiveImNotif(ReceiveImNotifIn data) {
}
}
The wsdl contains only one operation with one input parameter:
...
...
The input parameter is complex type. from xsd:
...
<xs:element name="receiveImNotifIn">
<xs:complexType>
<xs:sequence>
<xs:element name="merchTermId" type="xs:int" />
<xs:element name="merchTrxId" type="xs:int" />
<xs:element name="bankTrxId" type="xs:int" />
<xs:element name="bankTrxResult" type="xs:int" />
<xs:element name="authCode" type="authCodeType" />
<xs:element minOccurs="0" name="mpiCat" type="xs:int" />
<xs:element name="isRepeated" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
...
I generated a Java class for this type, using wsimport tool
(foo.ReceiveImNotifIn)
When I deploy the bean, the JBoss say:
org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://mf.cellum.com/MerchantManagement}>receiveImNotifIn
Can somebody help me how can I set type mappings?
In the source code of JavaWS I see that a TypeMappingRegistryImpl object is instantiated and returns a newly created TypeMappingImpl for encoding: literal. The LiteralTypeMapping class registers some data types, but I don't know how to add my foo.ReceiveImNotifIn to this. I think the java-type-mapping in wsdl is not good for this problem because it dies earlier.
Thanks, Tamas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192721#4192721
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192721
16 years, 3 months
[JBossWS] - Converting EJB2.1 to Webservice
by altes-kind
Hi,
I'm pretty new to web services and currently working on an app which has to be migrated from Bea Weblogic 8.1 to JBoss AS 4.2.1.
Currently the app is using the Bea Weblogic specific Ant task servicegen to create the webservice producer out of an EJB2.1 project (see http://edocs.beasys.com/wls/docs81/webserv/anttasks.html#1063540):
<servicegen
| destEar="${build.dir}/${ejb.jar.name}-ws"
| warName="${ejb.jar.name}-ws.war">
| <service
| ejbJar="${build.dir}/${ejb.jar.name}.jar"
| includeEJBs="ArchiveAccessRemote"
| targetNamespace="de.proactiv"
| serviceName="ArchiveAccess"
| serviceURI="/ArchiveAccess"
| style="document"
| generateTypes="True"
| expandMethods="True">
| <!--client
| packageName="de.proactiv.postbox.services.archiveaccess.webservice"
| clientJarName="${ejb.jar.name}_client.jar"
| /-->
| </service>
| </servicegen>
Is there a similar Ant taks in JBoss WS to convert EJB2.1 projects to webservices?
I read about wsprovide but it doesn't seem to work with EJB2.1. Is this correct?
I also read about wstool. Is it still supported in JBoss WS? If yes, where can I find the documentation?
Thank you very much! :-)
altes-kind
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192231#4192231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192231
16 years, 3 months
[JBossWS] - Could not transmit message when 2nd time deploying.
by dmitry.kudrenko
Greetings,
I have web application deployed on jboss 4.2.2.GA. This application communicates with a web service. It works fine when I deploy the application first time after restarting jboss. But stops work when I deploy it without restarting jboss.
Caused by: java.io.IOException: Could not transmit message
| at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
| ... 41 more
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
| ... 44 more
| Caused by: java.lang.NullPointerException
| at org.jboss.ws.core.soap.SOAPElementImpl.<init>(SOAPElementImpl.java:86)
I noticed with WireShark that when I deploy the application second time and try to send request to the web service it sends the SOAP request and response is received.
Also, when I tried to deploy 2 different instances of application in the same time to the jboss only the application who sent SOAP request first is working. The second application faults with the same error as described above.
Have anybody idea what can be a reason of this issue?
Thanks in advance.
--
Dmitry Kudrenko
ARDAS group (http://www.ardas.dp.ua)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191994#4191994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191994
16 years, 3 months