you can do something like this,

<service name="POJOService" targetNamespace="http//
axis2.apache.org/sample/pojo">
    <description>
        This is my first service, which says hello
    </description>
    <schema schemaNamespace="http//axis2.apache.org/sample/pojo/types"
            elementFormDefaultQualified="true">
        <mapping namespace="http//axis2.apache.org/sample/pojo/types"
                 package="org.apache.axis2.sample.pojo.types"/>
    </schema>
    <messageReceivers>
            <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out";

class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
        </messageReceivers>
    <parameter
name="ServiceClass">org.apache.axis2.sample.pojo.service.POJOService</parameter>
</service>

you can add many package mappings

thanks,
Amila.

On Thu, Sep 1, 2011 at 6:54 PM, Evan Patton <pat...@rpi.edu> wrote:

> Thanks Amila,
>
> I am using Axis2 and my services.xml file currently specifies a
> targetNamespace on the <service> tag as well as a nested schemaNamespace
> attribute <schema> tag. However, these only seem to apply for the class
> named in <parameter name="serviceClass"> field. How would I specify that
> there is a mapping for the entire package? I've been using this page
> http://axis.apache.org/axis2/java/core/docs/axis2config.html#Service_Configuration
>  as
> a basis for writing my services.xml.
>
> Evan
>
> On Sep 1, 2011, at 5:09 AM, Amila Suriarachchi wrote:
>
> Do you use Axis1.x or Axis2.
>
> if you use Axis2 you can add the package namespace mapping at the
> services.xml file.
>
> thanks,
> Amila.
>
> On Tue, Aug 30, 2011 at 2:54 AM, Evan Patton <pat...@rpi.edu> wrote:
>
>> Hello all,
>>
>> I'm generating a web service from a POJO, and in some cases return a
>> nested class. In the XML schema generated by Axis, the types representing
>> the inputs and outputs of the web service are declared in one target
>> namespace (i.e. where it will be deployed), whereas the nested class is
>> defined in a different schema with a target namespace equivalent to 
>> "http://"+(the
>> package name with .edu at the end)+"/xsd", rather than being placed in the
>> target namespace of its containing class. Is there any way to tell Apache
>> Axis what the namespace should be, either at compile time or through
>> introspection? The package name does not exist as a DNS name so it doesn't
>> make sense to use it as part of an http address.
>>
>> Thanks,
>> Evan
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>  ------------------------------
>
> Spam <http://respite.rpi.edu/b.php?c=s&i=43540007&m=cc8462563011>
> Not spam <http://respite.rpi.edu/b.php?c=n&i=43540007&m=cc8462563011>
> Forget previous 
> vote<http://respite.rpi.edu/b.php?c=f&i=43540007&m=cc8462563011>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to