[jboss-user] [JBossWS] - namespace for ComplexType from Java to WSDL

devnullinout do-not-reply at jboss.com
Mon Dec 18 19:50:46 EST 2006


I am trying to create an EJB web service using JBoss with NetBeans (create web service and then generate WSDL). I have a Java class ArrayOfString  within package developer.foo.com as follows

package com.foo.developer;
  | 
  | public class ArrayOfString {
  | 
  |     protected java.lang.String[] str;
  | 
  |     public ArrayOfString() {
  |     }
  |     
  |     public ArrayOfString(java.lang.String[] string) {
  |         this.str = string;
  |     }
  | 
  |     public java.lang.String[] getString() {
  |         return str;
  |     }
  | 
  |     public void setString(java.lang.String[] str) {
  |         this.str = str;
  |     }
  | 
  | }

This corresponding type in WSDL is used by a message (in WSDL) element. The schema type generated within the WSDL document based on the Java code is as follows: 

  <schema elementFormDefault='qualified' 
  | targetNamespace='http://developer.foo.com/jaws' 
  | xmlns='http://www.w3.org/2001/XMLSchema' 
  | xmlns:ns1='http://developer.foo.com/' 
  | xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' 
  | xmlns:tns='http://developer.foo.com/jaws' 
  | xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> 
  |    <import namespace='http://developer.foo.com/'/>
  |    <complexType name='ArrayOfString'>
  |     <sequence>
  |      <element maxOccurs='unbounded' minOccurs='0' name='string' nillable='true' type='string'/>
  |     </sequence>
  |    </complexType>
 

>From above, you can see that targetNamespace='http://developer.foo.com/jaws'. However, what I need is to make the targetNamespace to be http://developer.foo.com/.  

Can you help me to make this work? How can I instruct the code to make the targetNamespace to be http://developer.foo.com/?

 

Thanks,



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994840#3994840

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994840



More information about the jboss-user mailing list