Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Spring, define soap version and issue with @RootElement

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

Error that I am getthing:

cannot create message: incorrect content-type for SOAP version. Got: application/soap+xml; charset=UTF-8 Expected: text/xml




SoapClient.class
e WebServiceTemplate template;

   public GetNetworkOperatorsResponse operators(GetNetworkOperators request){
       template = new WebServiceTemplate(marshaller);

       GetNetworkOperatorsResponse getNetworkOperatorsResponse = (GetNetworkOperatorsResponse) template.marshalSendAndReceive("xx.xxx.xxx.xxx",request);
       return getNetworkOperatorsResponse;
   }
}

Config:

SoapConfig.class




1. How to define soap version? I need to have soap 1.2
2. Also I get when marshalling issue with RootElement

"unable to marshal as an element because it is missing an @XmlRootElement annotation".



Now I added rootelement to my class which was generated from wsdl file. How must I change "marshaller" that I will add it via code?

Thank you.
miha






 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!