java调用.net webservice 返回图片
关键字: axis
由于没学习过.net
,最近程序中需要调用.net
的webservice
接口得到一张图片。在网上找了好多资料选用的axis来实现调用。
首先看看.net
实现Webmehod的两种方式,这两种方式java
传参数的方式也有不同
1.rpc方式:
Java
代码
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
namespace WebService1
{
[WebService
(Namespace = "http://tempuri.org/"
)]
public
class
Service1 : System.Web.Services.WebService
{
[WebMethod]
[SoapRpcMethod(Action = "http://tempuri.org/hello"
, RequestNamespace =
"http://tempuri.org/"
, ResponseNamespace =
"http://tempuri.org/"
)]
public
string hello(String s)
{
相关文档:
JAVA annotation入门
最近对spring源码感兴趣,今天看到annotation部分,略记之。
一. 最常见的annotation
@Override:用在方法之上,用来告诉别人这一个方法是改写父类的
@Deprecated:建议别人不要使用旧的API的时候用的,编译的时候会用产生警告信息,可以设定在 ......
import sun.net.ftp.*;
import sun.net.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.*;
public class FtpApplet extends Applet
{
FtpClient aftp;
DataOutputStream outputs ;
TelnetInputStream ins;
TelnetOutputStream outs;
TextArea lsArea;
La ......
在获取文本的时候,经常遇到数据格式的问题,需要判断或转换。
本文旨在解决全角符号转换为半角符号的问题。
网上大体有两种方法:转换编码或则替换。
我使用的是转换编码
1. string checkStr="123456";
2. //判断是否包含全角字符[1]
3. if(checkStr.length() != checkStr.getBytes().length) ......
package com.infowarelab.java.test;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class ReflectTester {
@SuppressWarnings("unchec ......
首先,做一点说明。Flex是不能直接连接数据库的,这一点大家需要知道,它只能间接地连接数据库。Flex中提供了三种方式:HttpService,WebService 和RemoteObject。其中HttpService可以直接获取XML中的数据,还可以通过JSP,ASP以及PHP读取数据库中的数据,这个比较简单,而且网上也有很多例子,我就不多说了。WebService我不 ......