[JBossWS] - Re: returning array undefined in web service
by mckeno
Hi Alessio,
Here are some more details:
The wsdl schema:
<definitions name="MyService"targetNamespace="http://xxx/yyy/services">
| <types>
| <xs:schema targetNamespace="http://xxx/yyy/services" version="1.0">
| <xs:element name="getNumber" type="tns:getNumber"/>
| <xs:element name="getNumberResponse" type="tns:getNumberResponse"/>
| <xs:complexType name="getNumber">
| <xs:sequence>
| <xs:element minOccurs="0" name="userName" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
|
| <xs:complexType name="getNumberResponse">
| <xs:sequence>
| <xs:element maxOccurs="unbounded" minOccurs="0" name="numbers" type="xs:int"/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
|
| <message name="Mojo_getNumberResponse">
| <part element="tns:getNumberResponse" name="getNumberResponse"/>
| </message>
|
| <message name="Mojo_getNumber">
| <part element="tns:getNumber" name="getNumber"/>
| </message>
|
| <portType name="Mojo">
| <operation name="getNumber" parameterOrder="getNumber">
| <input message="tns:Mojo_getNumber"/>
| <output message="tns:Mojo_getNumberResponse"/>
| </operation>
| </portType>
|
| <binding name="MojoBinding" type="tns:Mojo">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="getNumber">
| <soap:operation soapAction=""/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
|
| <service name="MojoService">
| <port binding="tns:MojoBinding" name="MojoPort">
| <soap:address location="http://localhost:8080/myService/MyWebService"/>
| </port>
| </service>
| </definitions>
The web service class in EJB container
| @Stateless
| @WebService(name = "Mojo", targetNamespace = "http://xxx/yyy/services", serviceName = "MyService")
| @WebContext(contextRoot="/myService")
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
| public class MyWebService {
|
| @SuppressWarnings("unused")
| private Logger log = Logger.getLogger(this.getClass());
|
| @WebMethod
| @WebResult(name = "numbers")
| public int[] getNumber(@WebParam(name = "userName") String sth) {
| int[] number = new int[3];
| number[0] = 7;
| number[1] = 2;
| number[2] = 3;
| System.out.println("Get Number call");
| log.info("ARRAY METHOD CALLED " + number.length);
| return number;
| }
| }
JBoss version : [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
JbossWS: I think i used the one came with the Jboss server, not sure how to check its version...
I did use soapUI to capture the request and respone and it works ok:
request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://xxx/yyy/services">
| <soapenv:Header/>
| <soapenv:Body>
| <ser:getNumber>
| <!--Optional:-->
| <userName>3</userName>
| </ser:getNumber>
| </soapenv:Body>
| </soapenv:Envelope>
response:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
| <env:Header/>
| <env:Body>
| <ns2:getNumberResponse xmlns:ns2="http://mojo.streamverse.com/services">
| <numbers>7</numbers>
| <numbers>2</numbers>
| <numbers>3</numbers>
| </ns2:getNumberResponse>
| </env:Body>
| </env:Envelope>
Only that when it is called from the Flash application(flash 7, using WebService Connector) then the results always undefined(non array result works ok in flash).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108757#4108757
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108757
18 years, 5 months
[JBoss Portal] - Re: JBoss sizing (examples, sites, simple architecture?)
by Jorwo
Hello!
Soon5, thanks for the inputs.
Regarding Apache, I was wondering if anyone was using it as the primary web server, with Tomcat/JB Portal behind it.
I've built a project before in which I used Tomcat to process the JSP pages, while Apache would stand in front and process the HTML pages and provide the security (offering more security because more widely used and tested). And there is a connector, to allow Apache to work seamlessly with Tomact (jk2 connector, if my memory serves me well).
Regarding the number of users, I'd say around 200 users, not much.
When you're rolling out your JBoss Portal, are you using different machines for some of the services (for example: Hibernate, AS, Clustering in 1; JBoss Portal, Tomact in 2)? I'm just trying to get a grasp on how I can distribute the services in machines.
So, if there are any more shareable insights, I'd appreciate. :)
Chris, I'll be sure to look into that, yes. But since I'm pressed on time and bureocracy limits my ability to hire services fast, that's why I was trying to get a first view on how a small site would distribute a JB Portal solution across a few machines.
I may well hire consultants for when i have a definite project and for sure I'll look into the consulting fees, I know the time saved will be well spent.
I know things are abstract, but for example I've been many times confronted with the fact that Mi***soft easily lays out some standard references that helps them 'selling' the product (and, no, I've been working with Java for years, never did any Sharpoint).
See an example from their 'solutionaccelerators'. Just examples, but give good food for thought.
http://www.microsoft.com/technet/solutionaccelerators/cits/iwp/ctir/02cti...
Back to the point, actually I shouln't have asked for sizing, which seems definite, but I should have solicited something like a reference architecture for a small site (200 users, extranet like).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108753#4108753
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108753
18 years, 5 months