You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by yeatk <ye...@gmail.com> on 2012/10/04 19:36:00 UTC

Need Help! I can't generate cxf client!

I need some help. I want to generate cxf client for this address
"https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"

1) I tried "wsdl2java -frontend jaxws21
https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
but I took "Premature end of file" then

2) I downloaded wsdl file to my computer, I changed
"http://yws.sagliknet..." with "https://yws.sagliknet..." then I tried
"wsdl2java -frontend jaxws21 WSSKRSSistemlerPort.xml". I generated objects
successful

3) I wrote test code but I took javax.xml.ws.WebServiceException: Port
{http://ws.esaglik.surat.com.tr/}WSSKRSSistemlerPort not found

                WSSKRSSistemlerService service = new
WSSKRSSistemlerService();
		WSSKRSSistemler port = service.getWSSKRSSistemlerPort();
		port.sistemler();

- I changed test code but I took "org.apache.cxf.binding.soap.SoapFault: A
SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint."

                ClientProxyFactoryBean factory = new
ClientProxyFactoryBean();
		factory.setServiceClass(WSSKRSSistemler.class);
	
factory.setAddress("https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-  
WSHariciWebServisleri/WSSKRSSistemlerPort");
		WSSKRSSistemler client = (WSSKRSSistemler)factory.create();
		System.out.println(client.sistemler());

Please help to me. How can I fix these errors?
I'm sorry for my poor english :) SkrsTest.zip
<http://cxf.547215.n5.nabble.com/file/n5715656/SkrsTest.zip>  



--
View this message in context: http://cxf.547215.n5.nabble.com/Need-Help-I-can-t-generate-cxf-client-tp5715656.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Need Help! I can't generate cxf client!

Posted by Glen Mazza <gl...@gmail.com>.
Never forget the email post-processing step.  :)

Yeatk, my SOAP client tutorial may be of help if you'd like to use Maven 
to build your project:
http://www.jroller.com/gmazza/entry/soap_client_tutorial

Glen

On 10/04/2012 11:08 PM, Edwin Quita wrote:
> sorry i meant the cxf-codegen-plugin :)
>
> On Thu, Oct 4, 2012 at 8:07 PM, Edwin Quita <ed...@gmail.com> wrote:
>> hello there,
>>
>> alternatively, you can use the foo plugin to generate the java codes
>> for your .wsdl file:
>>
>>          <!-- CXF Code Generator plugin -->
>>              <plugin>
>>                  <groupId>org.apache.cxf</groupId>
>>                  <artifactId>cxf-codegen-plugin</artifactId>
>>                  <version>${cxf.version}</version>
>>                  <executions>
>>                      <execution>
>>                          <id>generate-sources</id>
>>                          <phase>generate-sources</phase>
>>                          <configuration>
>>                              <wsdlOptions>
>>                                  <wsdlOption>
>>
>> <wsdl>src/main/resources/META-INF/YOUR_WSDL_FILE.wsdl</wsdl>
>>                                  </wsdlOption>
>>                              </wsdlOptions>
>>                          </configuration>
>>                          <goals>
>>                              <goal>wsdl2java</goal>
>>                          </goals>
>>                      </execution>
>>                  </executions>
>>              </plugin>
>>                          <!-- build-helper plugin: used to mount generated sources -->
>>                          <plugin>
>>                                  <groupId>org.codehaus.mojo</groupId>
>>                                  <artifactId>build-helper-maven-plugin</artifactId>
>>                                  <version>1.3</version>
>>                                  <executions>
>>                                          <execution>
>>                                                  <phase>generate-sources</phase>
>>                                                  <goals>
>>                                                          <goal>add-source</goal>
>>                                                  </goals>
>>                                                  <configuration>
>>                                                          <sources>
>>                                                                  <source>target/generated-sources/cxf</source>
>>                                                          </sources>
>>                                                  </configuration>
>>                                          </execution>
>>                                  </executions>
>>                          </plugin>
>>
>>
>> HTH,
>> edwin
>>
>> On Thu, Oct 4, 2012 at 10:36 AM, yeatk <ye...@gmail.com> wrote:
>>> I need some help. I want to generate cxf client for this address
>>> "https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
>>>
>>> 1) I tried "wsdl2java -frontend jaxws21
>>> https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
>>> but I took "Premature end of file" then
>>>
>>> 2) I downloaded wsdl file to my computer, I changed
>>> "http://yws.sagliknet..." with "https://yws.sagliknet..." then I tried
>>> "wsdl2java -frontend jaxws21 WSSKRSSistemlerPort.xml". I generated objects
>>> successful
>>>
>>> 3) I wrote test code but I took javax.xml.ws.WebServiceException: Port
>>> {http://ws.esaglik.surat.com.tr/}WSSKRSSistemlerPort not found
>>>
>>>                  WSSKRSSistemlerService service = new
>>> WSSKRSSistemlerService();
>>>                  WSSKRSSistemler port = service.getWSSKRSSistemlerPort();
>>>                  port.sistemler();
>>>
>>> - I changed test code but I took "org.apache.cxf.binding.soap.SoapFault: A
>>> SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint."
>>>
>>>                  ClientProxyFactoryBean factory = new
>>> ClientProxyFactoryBean();
>>>                  factory.setServiceClass(WSSKRSSistemler.class);
>>>
>>> factory.setAddress("https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-
>>> WSHariciWebServisleri/WSSKRSSistemlerPort");
>>>                  WSSKRSSistemler client = (WSSKRSSistemler)factory.create();
>>>                  System.out.println(client.sistemler());
>>>
>>> Please help to me. How can I fix these errors?
>>> I'm sorry for my poor english :) SkrsTest.zip
>>> <http://cxf.547215.n5.nabble.com/file/n5715656/SkrsTest.zip>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://cxf.547215.n5.nabble.com/Need-Help-I-can-t-generate-cxf-client-tp5715656.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.


Re: Need Help! I can't generate cxf client!

Posted by Edwin Quita <ed...@gmail.com>.
sorry i meant the cxf-codegen-plugin :)

On Thu, Oct 4, 2012 at 8:07 PM, Edwin Quita <ed...@gmail.com> wrote:
> hello there,
>
> alternatively, you can use the foo plugin to generate the java codes
> for your .wsdl file:
>
>         <!-- CXF Code Generator plugin -->
>             <plugin>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf-codegen-plugin</artifactId>
>                 <version>${cxf.version}</version>
>                 <executions>
>                     <execution>
>                         <id>generate-sources</id>
>                         <phase>generate-sources</phase>
>                         <configuration>
>                             <wsdlOptions>
>                                 <wsdlOption>
>
> <wsdl>src/main/resources/META-INF/YOUR_WSDL_FILE.wsdl</wsdl>
>                                 </wsdlOption>
>                             </wsdlOptions>
>                         </configuration>
>                         <goals>
>                             <goal>wsdl2java</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>                         <!-- build-helper plugin: used to mount generated sources -->
>                         <plugin>
>                                 <groupId>org.codehaus.mojo</groupId>
>                                 <artifactId>build-helper-maven-plugin</artifactId>
>                                 <version>1.3</version>
>                                 <executions>
>                                         <execution>
>                                                 <phase>generate-sources</phase>
>                                                 <goals>
>                                                         <goal>add-source</goal>
>                                                 </goals>
>                                                 <configuration>
>                                                         <sources>
>                                                                 <source>target/generated-sources/cxf</source>
>                                                         </sources>
>                                                 </configuration>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>
>
> HTH,
> edwin
>
> On Thu, Oct 4, 2012 at 10:36 AM, yeatk <ye...@gmail.com> wrote:
>> I need some help. I want to generate cxf client for this address
>> "https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
>>
>> 1) I tried "wsdl2java -frontend jaxws21
>> https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
>> but I took "Premature end of file" then
>>
>> 2) I downloaded wsdl file to my computer, I changed
>> "http://yws.sagliknet..." with "https://yws.sagliknet..." then I tried
>> "wsdl2java -frontend jaxws21 WSSKRSSistemlerPort.xml". I generated objects
>> successful
>>
>> 3) I wrote test code but I took javax.xml.ws.WebServiceException: Port
>> {http://ws.esaglik.surat.com.tr/}WSSKRSSistemlerPort not found
>>
>>                 WSSKRSSistemlerService service = new
>> WSSKRSSistemlerService();
>>                 WSSKRSSistemler port = service.getWSSKRSSistemlerPort();
>>                 port.sistemler();
>>
>> - I changed test code but I took "org.apache.cxf.binding.soap.SoapFault: A
>> SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint."
>>
>>                 ClientProxyFactoryBean factory = new
>> ClientProxyFactoryBean();
>>                 factory.setServiceClass(WSSKRSSistemler.class);
>>
>> factory.setAddress("https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-
>> WSHariciWebServisleri/WSSKRSSistemlerPort");
>>                 WSSKRSSistemler client = (WSSKRSSistemler)factory.create();
>>                 System.out.println(client.sistemler());
>>
>> Please help to me. How can I fix these errors?
>> I'm sorry for my poor english :) SkrsTest.zip
>> <http://cxf.547215.n5.nabble.com/file/n5715656/SkrsTest.zip>
>>
>>
>>
>> --
>> View this message in context: http://cxf.547215.n5.nabble.com/Need-Help-I-can-t-generate-cxf-client-tp5715656.html
>> Sent from the cxf-user mailing list archive at Nabble.com.

Re: Need Help! I can't generate cxf client!

Posted by Edwin Quita <ed...@gmail.com>.
hello there,

alternatively, you can use the foo plugin to generate the java codes
for your .wsdl file:

	<!-- CXF Code Generator plugin -->
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <wsdlOptions>
                                <wsdlOption>

<wsdl>src/main/resources/META-INF/YOUR_WSDL_FILE.wsdl</wsdl>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
			<!-- build-helper plugin: used to mount generated sources -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>target/generated-sources/cxf</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>


HTH,
edwin

On Thu, Oct 4, 2012 at 10:36 AM, yeatk <ye...@gmail.com> wrote:
> I need some help. I want to generate cxf client for this address
> "https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
>
> 1) I tried "wsdl2java -frontend jaxws21
> https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-WSHariciWebServisleri/WSSKRSSistemlerPort?WSDL"
> but I took "Premature end of file" then
>
> 2) I downloaded wsdl file to my computer, I changed
> "http://yws.sagliknet..." with "https://yws.sagliknet..." then I tried
> "wsdl2java -frontend jaxws21 WSSKRSSistemlerPort.xml". I generated objects
> successful
>
> 3) I wrote test code but I took javax.xml.ws.WebServiceException: Port
> {http://ws.esaglik.surat.com.tr/}WSSKRSSistemlerPort not found
>
>                 WSSKRSSistemlerService service = new
> WSSKRSSistemlerService();
>                 WSSKRSSistemler port = service.getWSSKRSSistemlerPort();
>                 port.sistemler();
>
> - I changed test code but I took "org.apache.cxf.binding.soap.SoapFault: A
> SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint."
>
>                 ClientProxyFactoryBean factory = new
> ClientProxyFactoryBean();
>                 factory.setServiceClass(WSSKRSSistemler.class);
>
> factory.setAddress("https://yws.sagliknet.saglik.gov.tr/ESaglikYardimciServislerApp-
> WSHariciWebServisleri/WSSKRSSistemlerPort");
>                 WSSKRSSistemler client = (WSSKRSSistemler)factory.create();
>                 System.out.println(client.sistemler());
>
> Please help to me. How can I fix these errors?
> I'm sorry for my poor english :) SkrsTest.zip
> <http://cxf.547215.n5.nabble.com/file/n5715656/SkrsTest.zip>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Need-Help-I-can-t-generate-cxf-client-tp5715656.html
> Sent from the cxf-user mailing list archive at Nabble.com.