MartinoMensio / DP2-Labs

Distributed Programming 2 Laboratories @ Polytechnic University of Turin
MIT License
1 stars 0 forks source link

ass2 missing namespace in requests #14

Closed MartinoMensio closed 7 years ago

MartinoMensio commented 7 years ago

On LABINF pc, the request come out without xmlns="http://www.example.org/Neo4J"

Possible solution after having created the package-info.java file:

@XmlSchema(
        namespace="http://www.example.org/Neo4J",
        elementFormDefault=XmlNsForm.QUALIFIED)
package it.polito.dp2.NFFG.sol2;

import javax.xml.bind.annotation.*;
MartinoMensio commented 7 years ago

http://stackoverflow.com/questions/15785854/jaxb-namespace-missing

links to http://blog.bdoughan.com/2010/08/jaxb-namespaces.html

MartinoMensio commented 7 years ago

if the generated class is annotated with @XMLRootElement (achieavable by having element belonging to anonymous type) the namespace is sent also if the generated classes belong to a different package.